Skip to content

Commit ce8e8bd

Browse files
committed
fixup! fix: check instance of storage using helper function
1 parent 117c1f3 commit ce8e8bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use OCP\Files\ForbiddenException;
2222
use OCP\Files\InvalidPathException;
2323
use OCP\Files\Mount\IMountPoint;
24+
use OCP\Files\Storage\IStorage;
2425
use OCP\Files\StorageNotAvailableException;
2526
use PHPUnit\Framework\MockObject\MockObject;
2627
use Test\Traits\UserTrait;
@@ -63,12 +64,16 @@ class DirectoryTest extends \Test\TestCase {
6364

6465
private View&MockObject $view;
6566
private FileInfo&MockObject $info;
67+
private IStorage&MockObject $storage;
6668

6769
protected function setUp(): void {
6870
parent::setUp();
6971

7072
$this->view = $this->createMock(View::class);
7173
$this->info = $this->createMock(FileInfo::class);
74+
$this->storage = $this->createMock(IStorage::class);
75+
$this->info->method('getStorage')
76+
->willReturn($this->storage);
7277
$this->info->method('isReadable')
7378
->willReturn(true);
7479
$this->info->method('getType')

0 commit comments

Comments
 (0)