Definition at line 11 of file PluginAdminTest.php.
◆ setUp()
Sabre\DAVACL\PluginAdminTest::setUp |
( |
| ) |
|
Definition at line 15 of file PluginAdminTest.php.
References $principalBackend, and $tree.
20 new MockACLNode(
'adminonly', []),
24 $this->server =
new DAV\Server(
$tree);
25 $this->server->sapi =
new HTTP\SapiMock();
26 $plugin =
new DAV\Auth\Plugin(
new DAV\Auth\Backend\Mock());
27 $this->server->addPlugin($plugin);
◆ testAdminAccess()
Sabre\DAVACL\PluginAdminTest::testAdminAccess |
( |
| ) |
|
testNoAdminAccess
Definition at line 55 of file PluginAdminTest.php.
References $request, $response, and Sabre\HTTP\Sapi\createFromServerArray().
57 $plugin =
new Plugin();
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);
foreach($paths as $path) $request
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testNoAdminAccess()
Sabre\DAVACL\PluginAdminTest::testNoAdminAccess |
( |
| ) |
|
Definition at line 30 of file PluginAdminTest.php.
References $request, $response, and Sabre\HTTP\Sapi\createFromServerArray().
32 $plugin =
new 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);
foreach($paths as $path) $request
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ $server
Sabre\DAVACL\PluginAdminTest::$server |
The documentation for this class was generated from the following file: