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
attemtp to fix test
  • Loading branch information
Jasper Knockaert authored Jan 5, 2021
commit 87c640193bd9d2a6a4a29163ad0cb539f263cacc
8 changes: 7 additions & 1 deletion tests/lib/Files/Storage/Wrapper/EncryptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,12 @@ public function dataTestCopyKeys() {
* @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();

Expand All @@ -586,7 +592,7 @@ public function testGetHeader($path, $strippedPathExists, $strippedPath) {
$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'))
Expand Down