Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update EncryptionTest.php
  • Loading branch information
Jasper Knockaert authored Jan 5, 2021
commit 261966ace5f539f0ab676a063506f6e63469dce5
6 changes: 3 additions & 3 deletions tests/lib/Files/Storage/Wrapper/EncryptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public function testGetHeader($path, $strippedPathExists, $strippedPath) {
->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']);
Expand Down Expand Up @@ -671,8 +671,8 @@ public function testGetHeaderAddLegacyModule($header, $isEncrypted, $exists, $ex
->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);
Expand Down