aboutsummaryrefslogtreecommitdiffstats
path: root/tests
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:40 +0000
commit3813b955eeacded0c991befe7d1f49cbfc33ef30 (patch)
treec03f7e50da66312aa36af382af15bcd20fbcec6d /tests
parentae48fc86d229e9575f3ca49ad659cd73b31a0c36 (diff)
downloadnextcloud-server-3813b955eeacded0c991befe7d1f49cbfc33ef30.tar.gz
nextcloud-server-3813b955eeacded0c991befe7d1f49cbfc33ef30.zip
chore: ugly type juggling
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'tests')
-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));
}