aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php37
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()
);