diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-10-26 16:11:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 16:11:01 +0300 |
commit | aec8dce61acb4e0b6ce1019fd0136fab7885bb23 (patch) | |
tree | 8be9c9b975f7c14d063f239838cb8d8a9e765d4e /tests | |
parent | 1e450407f6106c3690f1b25cfdcf8ce1442d35e5 (diff) | |
parent | 8629d8e44f31dbcc0d8237391aa2fbaeea2d13f1 (diff) |
Merge pull request #34788 from nextcloud/bugfix/noid/preview-attributes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/PreviewControllerTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/Core/Controller/PreviewControllerTest.php b/tests/Core/Controller/PreviewControllerTest.php index 704ddade7a4..e6045386538 100644 --- a/tests/Core/Controller/PreviewControllerTest.php +++ b/tests/Core/Controller/PreviewControllerTest.php @@ -32,6 +32,7 @@ use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\Files\SimpleFS\ISimpleFile; +use OCP\Files\Storage\IStorage; use OCP\IPreview; use OCP\IRequest; @@ -176,6 +177,10 @@ class PreviewControllerTest extends \Test\TestCase { ->with($this->equalTo('file')) ->willReturn($file); + $storage = $this->createMock(IStorage::class); + $file->method('getStorage') + ->willReturn($storage); + $this->previewManager->method('isAvailable') ->with($this->equalTo($file)) ->willReturn(true); @@ -211,6 +216,10 @@ class PreviewControllerTest extends \Test\TestCase { $file->method('isReadable') ->willReturn(true); + $storage = $this->createMock(IStorage::class); + $file->method('getStorage') + ->willReturn($storage); + $preview = $this->createMock(ISimpleFile::class); $preview->method('getName')->willReturn('my name'); $preview->method('getMTime')->willReturn(42); |