]> source.dussan.org Git - nextcloud-server.git/commitdiff
attemtp to fix test
authorJasper Knockaert <jasper@knockaert.nl>
Tue, 5 Jan 2021 18:09:16 +0000 (19:09 +0100)
committerMichaIng (Rebase PR Action) <micha@dietpi.com>
Fri, 3 Sep 2021 13:40:41 +0000 (13:40 +0000)
tests/lib/Files/Storage/Wrapper/EncryptionTest.php

index 8bdb48fd854e75affffb9a2fa2d262ed49d5b94a..2a2a45e53cebaa34f8ca1f6fb491d2dd6552e668 100644 (file)
@@ -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'))