summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJasper Knockaert <jasper@knockaert.nl>2021-01-05 19:09:16 +0100
committerMichaIng (Rebase PR Action) <micha@dietpi.com>2021-09-03 13:40:41 +0000
commitab14c0322b0ea8f9b7ae827b91a7170b813ec78b (patch)
tree89c983d532199b9cbf238cc545d2e81dbbb141a3
parent82482adb483e1963be8fb5deedb24dca9d252708 (diff)
downloadnextcloud-server-ab14c0322b0ea8f9b7ae827b91a7170b813ec78b.tar.gz
nextcloud-server-ab14c0322b0ea8f9b7ae827b91a7170b813ec78b.zip
attemtp to fix test
-rw-r--r--tests/lib/Files/Storage/Wrapper/EncryptionTest.php8
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 8bdb48fd854..2a2a45e53ce 100644
--- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
+++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
@@ -566,6 +566,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();
@@ -597,7 +603,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'))