diff options
author | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
commit | 0b02a6d123b2014705998c94ddf3d460948d3eac (patch) | |
tree | 78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php | |
parent | 40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff) | |
download | volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2 volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip |
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php index 8f1451b49..ab0ad295e 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php @@ -24,13 +24,19 @@ class ServerPluginTest extends AbstractServer { } /** - * @covers \Sabre\DAV\ServerPlugin */ function testBaseClass() { $p = new ServerPluginMock(); - $this->assertEquals(array(),$p->getFeatures()); - $this->assertEquals(array(),$p->getHTTPMethods('')); + $this->assertEquals([],$p->getFeatures()); + $this->assertEquals([],$p->getHTTPMethods('')); + $this->assertEquals( + [ + 'name' => 'Sabre\DAV\ServerPluginMock', + 'description' => null, + 'link' => null + ], $p->getPluginInfo() + ); } @@ -41,20 +47,20 @@ class ServerPluginTest extends AbstractServer { 'REQUEST_METHOD' => 'OPTIONS', ); - $request = new HTTP\Request($serverVars); + $request = HTTP\Sapi::createFromServerArray($serverVars); $this->server->httpRequest = ($request); $this->server->exec(); $this->assertEquals(array( - 'DAV' => '1, 3, extended-mkcol, drinking', - 'MS-Author-Via' => 'DAV', - 'Allow' => 'OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, BEER, WINE', - 'Accept-Ranges' => 'bytes', - 'Content-Length' => '0', - 'X-Sabre-Version' => Version::VERSION, - ),$this->response->headers); - - $this->assertEquals('HTTP/1.1 200 OK',$this->response->status); + 'DAV' => ['1, 3, extended-mkcol, drinking'], + 'MS-Author-Via' => ['DAV'], + 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, BEER, WINE'], + 'Accept-Ranges' => ['bytes'], + 'Content-Length' => ['0'], + 'X-Sabre-Version' => [Version::VERSION], + ),$this->response->getHeaders()); + + $this->assertEquals(200, $this->response->status); $this->assertEquals('', $this->response->body); $this->assertEquals('OPTIONS',$this->testPlugin->beforeMethod); @@ -82,7 +88,10 @@ class ServerPluginTest extends AbstractServer { function testGetPlugins() { $this->assertEquals( - array(get_class($this->testPlugin) => $this->testPlugin), + array( + get_class($this->testPlugin) => $this->testPlugin, + 'core' => $this->server->getPlugin('core'), + ), $this->server->getPlugins() ); |