summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/tests/StorageTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/tests/StorageTest.php')
-rw-r--r--apps/files_trashbin/tests/StorageTest.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php
index eff33f9b30c..3c660134d1c 100644
--- a/apps/files_trashbin/tests/StorageTest.php
+++ b/apps/files_trashbin/tests/StorageTest.php
@@ -36,6 +36,7 @@ use OCA\Files_Trashbin\Events\MoveToTrashEvent;
use OCA\Files_Trashbin\Storage;
use OCA\Files_Trashbin\Trash\ITrashManager;
use OCP\Files\Cache\ICache;
+use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\ILogger;
@@ -545,12 +546,14 @@ class StorageTest extends \Test\TestCase {
$logger = $this->getMockBuilder(ILogger::class)->getMock();
$eventDispatcher = $this->createMock(EventDispatcherInterface::class);
$rootFolder = $this->createMock(IRootFolder::class);
+ $userFolder = $this->createMock(Folder::class);
$node = $this->getMockBuilder(Node::class)->disableOriginalConstructor()->getMock();
$trashManager = $this->createMock(ITrashManager::class);
$event = $this->getMockBuilder(MoveToTrashEvent::class)->disableOriginalConstructor()->getMock();
$event->expects($this->any())->method('shouldMoveToTrashBin')->willReturn(!$appDisablesTrash);
- $rootFolder->expects($this->any())->method('getById')->with($fileID)->willReturn([$node]);
+ $userFolder->expects($this->any())->method('getById')->with($fileID)->willReturn([$node]);
+ $rootFolder->expects($this->any())->method('getUserFolder')->willReturn($userFolder);
$storage = $this->getMockBuilder(Storage::class)
->setConstructorArgs(