summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-06-08 23:32:16 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-06-23 23:04:44 +0000
commitf724760f67bbd8c177dd716fa3b95e990a787bda (patch)
treebfb115595d67f212eecdf85a3a7099af63c8c2e9 /tests/lib
parentfaea2440ed8b7bf9614556b88fc0c8357ac9cf84 (diff)
downloadnextcloud-server-f724760f67bbd8c177dd716fa3b95e990a787bda.tar.gz
nextcloud-server-f724760f67bbd8c177dd716fa3b95e990a787bda.zip
chore: ugly type juggling
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/Files/Node/FolderTest.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php
index d745a05ba17..0bcf69c5c13 100644
--- a/tests/lib/Files/Node/FolderTest.php
+++ b/tests/lib/Files/Node/FolderTest.php
@@ -24,6 +24,7 @@ use OC\Files\Search\SearchQuery;
use OC\Files\Storage\Temporary;
use OC\Files\Storage\Wrapper\Jail;
use OCP\Files\Cache\ICacheEntry;
+use OCP\Files\IRootFolder;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\NotFoundException;
use OCP\Files\Search\ISearchComparison;
@@ -462,12 +463,13 @@ class FolderTest extends NodeTest {
}
public function testIsSubNode() {
- $file = new Node(null, $this->view, '/foo/bar');
- $folder = new Folder(null, $this->view, '/foo');
+ $rootFolderMock = $this->createMock(IRootFolder::class);
+ $file = new Node($rootFolderMock, $this->view, '/foo/bar');
+ $folder = new Folder($rootFolderMock, $this->view, '/foo');
$this->assertTrue($folder->isSubNode($file));
$this->assertFalse($folder->isSubNode($folder));
- $file = new Node(null, $this->view, '/foobar');
+ $file = new Node($rootFolderMock, $this->view, '/foobar');
$this->assertFalse($folder->isSubNode($file));
}