diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-02-20 22:12:00 +0100 |
---|---|---|
committer | Simon L <szaimen@e.mail.de> | 2023-04-17 23:46:52 +0200 |
commit | d9c81f56ad25d6665e87468cf18dc2646334fb3b (patch) | |
tree | 42859dc2a51ad4613423df4d3fece13fbd3ee6c2 /apps/dav/tests | |
parent | 160bd75d0ad59b3692ae2e904be52c9e4e7295f4 (diff) | |
download | nextcloud-server-d9c81f56ad25d6665e87468cf18dc2646334fb3b.tar.gz nextcloud-server-d9c81f56ad25d6665e87468cf18dc2646334fb3b.zip |
tests: Adapt node related unit tests mocks to required root view
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php | 4 | ||||
-rw-r--r-- | apps/dav/tests/unit/Files/FileSearchBackendTest.php | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index b0d3bdd8ec7..0f41ff97cc6 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -218,13 +218,13 @@ class DirectoryTest extends \Test\TestCase { $this->view->expects($this->any()) ->method('getRelativePath') - ->willReturnCallback(function($path) { + ->willReturnCallback(function ($path) { return str_replace('/admin/files/', '', $path); }); $this->view->expects($this->any()) ->method('getAbsolutePath') - ->willReturnCallback(function($path) { + ->willReturnCallback(function ($path) { return Filesystem::normalizePath('/admin/files' . $path); }); diff --git a/apps/dav/tests/unit/Files/FileSearchBackendTest.php b/apps/dav/tests/unit/Files/FileSearchBackendTest.php index cc4dcb62b75..715130d2fae 100644 --- a/apps/dav/tests/unit/Files/FileSearchBackendTest.php +++ b/apps/dav/tests/unit/Files/FileSearchBackendTest.php @@ -86,9 +86,11 @@ class FileSearchBackendTest extends TestCase { ->disableOriginalConstructor() ->getMock(); - $this->view = $this->getMockBuilder(View::class) - ->disableOriginalConstructor() - ->getMock(); + $this->view = $this->createMock(View::class); + + $this->view->expects($this->any()) + ->method('getRoot') + ->willReturn(''); $this->view->expects($this->any()) ->method('getRelativePath') |