From 817e974c5ffc2de4732316114fdcb4f30ac292de Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 9 Jan 2017 14:26:31 +0100 Subject: dont write a certificate bundle if the shipped ca bundle is empty Signed-off-by: Robin Appelman --- tests/lib/Security/CertificateManagerTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 92a063d47c7..408e65c6766 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -8,8 +8,10 @@ namespace Test\Security; +use OC\Files\Storage\Temporary; use \OC\Security\CertificateManager; use OCP\IConfig; +use OCP\ILogger; /** * Class CertificateManagerTest @@ -43,7 +45,7 @@ class CertificateManagerTest extends \Test\TestCase { $config->expects($this->any())->method('getSystemValue') ->with('installed', false)->willReturn(true); - $this->certificateManager = new CertificateManager($this->username, new \OC\Files\View(), $config); + $this->certificateManager = new CertificateManager($this->username, new \OC\Files\View(), $config, $this->createMock(ILogger::class)); } protected function tearDown() { @@ -143,7 +145,7 @@ class CertificateManagerTest extends \Test\TestCase { /** @var CertificateManager | \PHPUnit_Framework_MockObject_MockObject $certificateManager */ $certificateManager = $this->getMockBuilder('OC\Security\CertificateManager') - ->setConstructorArgs([$uid, $view, $config]) + ->setConstructorArgs([$uid, $view, $config, $this->createMock(ILogger::class)]) ->setMethods(['getFilemtimeOfCaBundle', 'getCertificateBundle']) ->getMock(); @@ -210,5 +212,4 @@ class CertificateManagerTest extends \Test\TestCase { [null, 10, 5, 8, false, true], ]; } - } -- cgit v1.2.3