diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-07-04 22:07:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-04 22:07:29 +0200 |
commit | dd2dfc89fd34b1c7c3f38e33b5942f2a57fafc7a (patch) | |
tree | bc04b9fab6282a3c47aac2cb76eaee71c8eca112 /tests/lib | |
parent | bab5a54aed49107c96ebfc783e52fda6e02b0e7a (diff) | |
parent | 5ba5c2d88e51f94138e27e3eb2c4a4b83d62bb1f (diff) | |
download | nextcloud-server-dd2dfc89fd34b1c7c3f38e33b5942f2a57fafc7a.tar.gz nextcloud-server-dd2dfc89fd34b1c7c3f38e33b5942f2a57fafc7a.zip |
Merge pull request #38976 from nextcloud/backport/38625/stable27
[stable27] fix: expect interface, not a specific implementation
Diffstat (limited to 'tests/lib')
-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)); } |