attemtp to fix test

This commit is contained in:
Jasper Knockaert 2021-01-05 19:09:16 +01:00 committed by GitHub
parent 81e3ae4753
commit 87c640193b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -560,6 +560,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();
@ -586,7 +592,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'))