Update EncryptionTest.php

This commit is contained in:
Jasper Knockaert 2021-01-05 21:45:50 +01:00 committed by GitHub
parent 664e74a82e
commit 261966ace5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -597,7 +597,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']);
@ -671,8 +671,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);