]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update EncryptionTest.php
authorJasper Knockaert <jasper@knockaert.nl>
Tue, 5 Jan 2021 20:45:50 +0000 (21:45 +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 7042fd09f5e02036dfe7fd1249597562ee74f210..a4ee5e45bd5fb62a82a8dd7b0c4f91dfa3377606 100644 (file)
@@ -608,7 +608,7 @@ class EncryptionTest extends Storage {
                        ->setMethods(['getCache','readFirstBlock', 'parseRawHeader'])
                        ->getMock();
                
-               $instance->expects($this->any())->method('getCache')->willReturn($cache);
+               $instance->expects($this->once())->method('getCache')->willReturn($cache);
                
                $instance->expects($this->once())->method(('parseRawHeader'))
                        ->willReturn([Util::HEADER_ENCRYPTION_MODULE_KEY => 'OC_DEFAULT_MODULE']);
@@ -687,8 +687,8 @@ class EncryptionTest extends Storage {
                        ->setMethods(['readFirstBlock', 'parseRawHeader', 'getCache'])
                        ->getMock();
 
-               $instance->expects($this->once())->method(('parseRawHeader'))->willReturn($header);
-               $instance->expects($this->any())->method('getCache')->willReturn($cache);
+               $instance->expects($this->any())->method(('parseRawHeader'))->willReturn($header);
+               $instance->expects($this->once())->method('getCache')->willReturn($cache);
 
                $result = $this->invokePrivate($instance, 'getHeader', ['test.txt']);
                $this->assertSameSize($expected, $result);