7 require_once
'Sabre/DAV/AbstractServer.php';
8 require_once
'Sabre/DAV/TestPlugin.php';
32 $this->assertEquals([], $p->getFeatures());
33 $this->assertEquals([], $p->getHTTPMethods(
''));
36 'name' =>
'Sabre\DAV\ServerPluginMock',
37 'description' => null,
39 ], $p->getPluginInfo()
48 'REQUEST_METHOD' =>
'OPTIONS',
52 $this->server->httpRequest = (
$request);
53 $this->server->exec();
56 'DAV' => [
'1, 3, extended-mkcol, drinking'],
57 'MS-Author-Via' => [
'DAV'],
58 'Allow' => [
'OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, BEER, WINE'],
59 'Accept-Ranges' => [
'bytes'],
60 'Content-Length' => [
'0'],
62 ], $this->response->getHeaders());
64 $this->assertEquals(200, $this->response->status);
65 $this->assertEquals(
'', $this->response->body);
66 $this->assertEquals(
'OPTIONS', $this->testPlugin->beforeMethod);
73 $this->assertEquals($this->testPlugin, $this->server->getPlugin(get_class($this->testPlugin)));
79 $this->assertNull($this->server->getPlugin(
'SomeRandomClassName'));
85 $this->assertEquals([], $this->testPlugin->getSupportedReportSet(
'/'));
93 get_class($this->testPlugin) => $this->testPlugin,
94 'core' => $this->server->getPlugin(
'core'),
96 $this->server->getPlugins()
The baseclass for all server plugins.
const VERSION
Full version number.
testGetSupportedReportSet()
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.