diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-06-08 23:32:16 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-06-21 16:53:20 +0200 |
commit | f6ac874dbf7d4e5cb2255f25464df214bb956ffb (patch) | |
tree | e3bcd4a4aa85e1f35af4124d3c578080c640954b /tests | |
parent | 167a5f394d9baafaa450843f76864070412727ca (diff) | |
download | nextcloud-server-f6ac874dbf7d4e5cb2255f25464df214bb956ffb.tar.gz nextcloud-server-f6ac874dbf7d4e5cb2255f25464df214bb956ffb.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.php | 8 |
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)); } |