8 require_once
'Sabre/DAVACL/MockACLNode.php';
9 require_once
'Sabre/HTTP/ResponseMock.php';
25 $this->server->sapi =
new HTTP\SapiMock();
27 $this->server->addPlugin($plugin);
33 $this->server->addPlugin($plugin);
36 'REQUEST_METHOD' =>
'OPTIONS',
38 'REQUEST_URI' =>
'/adminonly',
43 $this->server->httpRequest =
$request;
46 $this->server->exec();
48 $this->assertEquals(403,
$response->status);
58 $plugin->adminPrincipals = [
61 $this->server->addPlugin($plugin);
64 'REQUEST_METHOD' =>
'OPTIONS',
66 'REQUEST_URI' =>
'/adminonly',
71 $this->server->httpRequest =
$request;
74 $this->server->exec();
76 $this->assertEquals(200,
$response->status);
This plugin provides Authentication for a WebDAV server.
foreach($paths as $path) $request
testAdminAccess()
testNoAdminAccess
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.