summaryrefslogtreecommitdiffstats
path: root/tests/lib/Security
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-01-09 14:26:31 +0100
committerRobin Appelman <robin@icewind.nl>2017-01-09 16:51:27 +0100
commit817e974c5ffc2de4732316114fdcb4f30ac292de (patch)
tree7278e0a28bf8ecb9b4b861dc9c2c82eec18b39a9 /tests/lib/Security
parentae934cbdab07cfa14baae1b71b031d2eb53c8d67 (diff)
downloadnextcloud-server-817e974c5ffc2de4732316114fdcb4f30ac292de.tar.gz
nextcloud-server-817e974c5ffc2de4732316114fdcb4f30ac292de.zip
dont write a certificate bundle if the shipped ca bundle is empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Security')
-rw-r--r--tests/lib/Security/CertificateManagerTest.php7
1 files changed, 4 insertions, 3 deletions
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],
];
}
-
}