Skip to content

Commit 14334f5

Browse files
committed
fix: unit test
Signed-off-by: Vitor Mattos <vitor@php.rio>
1 parent abbe398 commit 14334f5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/Unit/Service/SignFileServiceTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ public function testSignWithFileNotFound():void {
187187
$file = new \OCA\Libresign\Db\File();
188188
$file->setUserId('username');
189189

190+
$this->root->method('getUserFolder')
191+
->willReturn($this->root);
190192
$this->root->method('getById')
191193
->willReturn([]);
192194
$this->userMountCache
@@ -217,6 +219,7 @@ public function testSignWithSuccess(string $mimetype, string $filename, string $
217219
$nextcloudFile->method('getContent')->willReturn('fake content');
218220
$nextcloudFile->method('getId')->willReturn(171);
219221

222+
$this->root->method('getUserFolder')->willReturn($this->root);
220223
$this->root->method('getById')->willReturn([$nextcloudFile]);
221224
$this->root->method('newFile')->willReturn($nextcloudFile);
222225
$this->userMountCache->method('getMountsForFileId')->wilLReturn([]);

0 commit comments

Comments
 (0)