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 and MichaIng committed Sep 3, 2021
commit 0af8a0c8f067000fed42191e96d859740dc15168
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