Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-10-26 16:11:01 +0300
committerGitHub <noreply@github.com>2022-10-26 16:11:01 +0300
commitaec8dce61acb4e0b6ce1019fd0136fab7885bb23 (patch)
tree8be9c9b975f7c14d063f239838cb8d8a9e765d4e /tests
parent1e450407f6106c3690f1b25cfdcf8ce1442d35e5 (diff)
parent8629d8e44f31dbcc0d8237391aa2fbaeea2d13f1 (diff)
Merge pull request #34788 from nextcloud/bugfix/noid/preview-attributes
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/PreviewControllerTest.php9
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);