diff options
author | Jasper Knockaert <jasper@knockaert.nl> | 2021-01-05 19:09:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 19:09:16 +0100 |
commit | 87c640193bd9d2a6a4a29163ad0cb539f263cacc (patch) | |
tree | 7a096e59a110c89cf4ff99af87422408ffba1a81 /tests | |
parent | 81e3ae4753774cf33e6f5bcaf1dc479e1dc5831c (diff) | |
download | nextcloud-server-87c640193bd9d2a6a4a29163ad0cb539f263cacc.tar.gz nextcloud-server-87c640193bd9d2a6a4a29163ad0cb539f263cacc.zip |
attemtp to fix test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/Storage/Wrapper/EncryptionTest.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index eccec7c28d5..ef524a55fda 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -560,6 +560,12 @@ class EncryptionTest extends Storage { * @param string $strippedPath */ public function testGetHeader($path, $strippedPathExists, $strippedPath) { + $cache = $this->getMockBuilder('\OC\Files\Cache\Cache') + ->disableOriginalConstructor()->getMock(); + $cache->expects($this->any()) + ->method('get') + ->willReturn(['encrypted' => true]); + $sourceStorage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor()->getMock(); @@ -586,7 +592,7 @@ class EncryptionTest extends Storage { $this->encryptionManager, $util, $this->logger, $this->file, null, $this->keyStore, $this->update, $this->mountManager, $this->arrayCache ] ) - ->setMethods(['readFirstBlock', 'parseRawHeader']) + ->setMethods(['getCache','readFirstBlock', 'parseRawHeader']) ->getMock(); $instance->expects($this->once())->method(('parseRawHeader')) |