diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-22 09:52:58 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 13:34:42 +0100 |
commit | ef4b59d3417ff9069425d7ae7a8e6e4f8165f7fb (patch) | |
tree | 3bf7113c1730cce86c15155a96adc89e3835d3bf /apps/dav/tests/unit | |
parent | 799f58391ea1dca3a24abe2598e08692af2a2c0b (diff) | |
download | nextcloud-server-ef4b59d3417ff9069425d7ae7a8e6e4f8165f7fb.tar.gz nextcloud-server-ef4b59d3417ff9069425d7ae7a8e6e4f8165f7fb.zip |
More fixes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r-- | apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php b/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php index 414e4bc971a..e0cdfaf732f 100644 --- a/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php @@ -26,6 +26,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\Search; use OCA\DAV\CalDAV\CalendarHome; use OCA\DAV\CalDAV\Search\SearchPlugin; use OCA\DAV\CalDAV\Search\Xml\Request\CalendarSearchReport; +use Sabre\Xml\Service; use Test\TestCase; class SearchPluginTest extends TestCase { @@ -41,6 +42,7 @@ class SearchPluginTest extends TestCase { $this->server = $this->createMock(\Sabre\DAV\Server::class); $this->server->tree = $this->createMock(\Sabre\DAV\Tree::class); $this->server->httpResponse = $this->createMock(\Sabre\HTTP\Response::class); + $this->server->xml = new Service(); $this->plugin = new SearchPlugin(); $this->plugin->initialize($this->server); @@ -62,6 +64,7 @@ class SearchPluginTest extends TestCase { $server->expects($this->at(0)) ->method('on') ->with('report', [$plugin, 'report']); + $server->xml = new Service(); $plugin->initialize($server); @@ -93,6 +96,11 @@ class SearchPluginTest extends TestCase { ->method('getHTTPDepth') ->with(2) ->will($this->returnValue(2)); + $this->server + ->method('getHTTPPrefer') + ->willReturn([ + 'return' => null + ]); $calendarHome->expects($this->at(0)) ->method('calendarSearch') ->will($this->returnValue([])); |