aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files/stream/encryption.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2016-03-30 23:20:37 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2016-03-31 19:24:47 +0200
commit93ed965cbb1952faafc1ca5e09ee0de84d122c05 (patch)
tree2631e5302305b9b59b25b006edca19650ca2a1bc /tests/lib/files/stream/encryption.php
parent8ef6c6c7bcf0b58561aee6ec1a18ea7a8643a773 (diff)
downloadnextcloud-server-93ed965cbb1952faafc1ca5e09ee0de84d122c05.tar.gz
nextcloud-server-93ed965cbb1952faafc1ca5e09ee0de84d122c05.zip
fix creation of versions of encrypted files on external storages
in order to create a 1:1 copy of a file if a version gets created we need to store this information on copyBetweenStorage(). This allows us to by-pass the encryption wrapper if we read the source file.
Diffstat (limited to 'tests/lib/files/stream/encryption.php')
-rw-r--r--tests/lib/files/stream/encryption.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/files/stream/encryption.php b/tests/lib/files/stream/encryption.php
index f67dd09bc4d..afb31f2822d 100644
--- a/tests/lib/files/stream/encryption.php
+++ b/tests/lib/files/stream/encryption.php
@@ -31,6 +31,7 @@ class Encryption extends \Test\TestCase {
$config = $this->getMockBuilder('\OCP\IConfig')
->disableOriginalConstructor()
->getMock();
+ $arrayCache = $this->getMock('OC\Memcache\ArrayCache');
$groupManager = $this->getMockBuilder('\OC\Group\Manager')
->disableOriginalConstructor()
->getMock();
@@ -39,7 +40,11 @@ class Encryption 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]);
+ $util = $this->getMock(
+ '\OC\Encryption\Util',
+ ['getUidAndFilename'],
+ [new View(), new \OC\User\Manager(), $groupManager, $config, $arrayCache]
+ );
$util->expects($this->any())
->method('getUidAndFilename')
->willReturn(['user1', $internalPath]);