diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-07 20:01:13 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-07 20:42:37 +0200 |
commit | 7656a8fa1210c096e677720f8ba0ab93affdd0e3 (patch) | |
tree | 3d2083c3b0e5596cfa5a2d6ae83f2600510b4fd7 /tests/lib/Files/Stream | |
parent | a819fd3f1eb455871ce424efc8be311582a1d43a (diff) | |
download | nextcloud-server-7656a8fa1210c096e677720f8ba0ab93affdd0e3.tar.gz nextcloud-server-7656a8fa1210c096e677720f8ba0ab93affdd0e3.zip |
File getMock Files tests
Diffstat (limited to 'tests/lib/Files/Stream')
-rw-r--r-- | tests/lib/Files/Stream/EncryptionTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php index 45204e48d09..6f3c879f9e6 100644 --- a/tests/lib/Files/Stream/EncryptionTest.php +++ b/tests/lib/Files/Stream/EncryptionTest.php @@ -3,6 +3,7 @@ namespace Test\Files\Stream; use OC\Files\View; +use OC\Memcache\ArrayCache; class EncryptionTest extends \Test\TestCase { @@ -31,7 +32,7 @@ class EncryptionTest extends \Test\TestCase { $config = $this->getMockBuilder('\OCP\IConfig') ->disableOriginalConstructor() ->getMock(); - $arrayCache = $this->getMock('OC\Memcache\ArrayCache'); + $arrayCache = $this->createMock(ArrayCache::class); $groupManager = $this->getMockBuilder('\OC\Group\Manager') ->disableOriginalConstructor() ->getMock(); @@ -40,11 +41,10 @@ class EncryptionTest extends \Test\TestCase { ->setMethods(['getAccessList']) ->getMock(); $file->expects($this->any())->method('getAccessList')->willReturn([]); - $util = $this->getMock( - '\OC\Encryption\Util', - ['getUidAndFilename'], - [new View(), new \OC\User\Manager(), $groupManager, $config, $arrayCache] - ); + $util = $this->getMockBuilder('\OC\Encryption\Util') + ->setMethods(['getUidAndFilename']) + ->setConstructorArgs([new View(), new \OC\User\Manager(), $groupManager, $config, $arrayCache]) + ->getMock(); $util->expects($this->any()) ->method('getUidAndFilename') ->willReturn(['user1', $internalPath]); |