diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-28 09:07:40 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-28 10:13:35 +0200 |
commit | f722640a32a6c0a7fb0232abf8f57052d43d19c9 (patch) | |
tree | ea3d9e1def278a2d6d2c9164701840d87f573eff /tests/lib/Files | |
parent | e7ec4601a36c28ad2940c66b4baeadac5cc7863e (diff) | |
download | nextcloud-server-f722640a32a6c0a7fb0232abf8f57052d43d19c9.tar.gz nextcloud-server-f722640a32a6c0a7fb0232abf8f57052d43d19c9.zip |
Proper DI of config
* Fixed comments
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Files')
-rw-r--r-- | tests/lib/Files/Config/UserMountCacheTest.php | 3 | ||||
-rw-r--r-- | tests/lib/Files/Storage/Wrapper/EncryptionTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Files/Stream/EncryptionTest.php | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index 51d488e6dee..376f0a0276c 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -13,6 +13,7 @@ use OC\Files\Mount\MountPoint; use OC\Log; use OC\User\Manager; use OCP\Files\Config\ICachedMountInfo; +use OCP\IConfig; use OCP\IDBConnection; use OCP\IUserManager; use Test\TestCase; @@ -42,7 +43,7 @@ class UserMountCacheTest extends TestCase { public function setUp() { $this->fileIds = []; $this->connection = \OC::$server->getDatabaseConnection(); - $this->userManager = new Manager(null); + $this->userManager = new Manager($this->createMock(IConfig::class)); $userBackend = new Dummy(); $userBackend->createUser('u1', ''); $userBackend->createUser('u2', ''); diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index 55b38d546de..245f39f5e2e 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -121,7 +121,7 @@ class EncryptionTest extends Storage { $this->util = $this->getMockBuilder('\OC\Encryption\Util') ->setMethods(['getUidAndFilename', 'isFile', 'isExcluded']) - ->setConstructorArgs([new View(), new Manager(), $this->groupManager, $this->config, $this->arrayCache]) + ->setConstructorArgs([new View(), new Manager($this->config), $this->groupManager, $this->config, $this->arrayCache]) ->getMock(); $this->util->expects($this->any()) ->method('getUidAndFilename') @@ -547,7 +547,7 @@ class EncryptionTest extends Storage { ->setConstructorArgs( [ new View(), - new Manager(), + new Manager($this->config), $this->groupManager, $this->config, $this->arrayCache @@ -612,7 +612,7 @@ class EncryptionTest extends Storage { ->disableOriginalConstructor()->getMock(); $util = $this->getMockBuilder('\OC\Encryption\Util') - ->setConstructorArgs([new View(), new Manager(), $this->groupManager, $this->config, $this->arrayCache]) + ->setConstructorArgs([new View(), new Manager($this->config), $this->groupManager, $this->config, $this->arrayCache]) ->getMock(); $cache = $this->getMockBuilder('\OC\Files\Cache\Cache') diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php index 6f3c879f9e6..e072dd6718d 100644 --- a/tests/lib/Files/Stream/EncryptionTest.php +++ b/tests/lib/Files/Stream/EncryptionTest.php @@ -43,7 +43,7 @@ class EncryptionTest extends \Test\TestCase { $file->expects($this->any())->method('getAccessList')->willReturn([]); $util = $this->getMockBuilder('\OC\Encryption\Util') ->setMethods(['getUidAndFilename']) - ->setConstructorArgs([new View(), new \OC\User\Manager(), $groupManager, $config, $arrayCache]) + ->setConstructorArgs([new View(), new \OC\User\Manager($config), $groupManager, $config, $arrayCache]) ->getMock(); $util->expects($this->any()) ->method('getUidAndFilename') |