Definition at line 8 of file ACLMethodTest.php.
◆ testAbstractPrivilege()
Sabre\DAVACL\ACLMethodTest::testAbstractPrivilege |
( |
| ) |
|
Sabre
Definition at line 152 of file ACLMethodTest.php.
155 new MockACLNode(
'test', []),
159 $server->on(
'getSupportedPrivilegeSet',
function($node, &$supportedPrivilegeSet) {
160 $supportedPrivilegeSet[
'{DAV:}foo'] = [
'abstract' =>
true];
162 $server->httpRequest =
new HTTP\Request(
'ACL',
'/test');
163 $body =
'<?xml version="1.0"?> 164 <d:acl xmlns:d="DAV:"> 166 <d:grant><d:privilege><d:foo /></d:privilege></d:grant> 167 <d:principal><d:href>/principals/foo/</d:href></d:principal> 170 $server->httpRequest->setBody($body);
171 $server->addPlugin(
new DAV\Auth\Plugin());
◆ testCallback()
Sabre\DAVACL\ACLMethodTest::testCallback |
( |
| ) |
|
◆ testNotSupportedByNode()
Sabre\DAVACL\ACLMethodTest::testNotSupportedByNode |
( |
| ) |
|
/** Sabre
Definition at line 28 of file ACLMethodTest.php.
31 new DAV\SimpleCollection(
'test'),
35 $server->httpRequest =
new HTTP\Request();
36 $body =
'<?xml version="1.0"?> 37 <d:acl xmlns:d="DAV:"> 39 $server->httpRequest->setBody($body);
40 $server->addPlugin(
new DAV\Auth\Plugin());
◆ testSuccessComplex()
Sabre\DAVACL\ACLMethodTest::testSuccessComplex |
( |
| ) |
|
Definition at line 280 of file ACLMethodTest.php.
284 'principal' =>
'principals/foo',
285 'privilege' =>
'{DAV:}write',
289 'principal' =>
'principals/bar',
290 'privilege' =>
'{DAV:}read',
295 $node =
new MockACLNode(
'test', $oldACL),
296 new DAV\SimpleCollection(
'principals', [
297 new MockPrincipal(
'foo',
'principals/foo'),
298 new MockPrincipal(
'baz',
'principals/baz'),
303 $server->httpRequest =
new HTTP\Request(
'ACL',
'/test');
304 $body =
'<?xml version="1.0"?> 305 <d:acl xmlns:d="DAV:"> 307 <d:grant><d:privilege><d:write /></d:privilege></d:grant> 308 <d:principal><d:href>/principals/foo</d:href></d:principal> 312 <d:grant><d:privilege><d:write /></d:privilege></d:grant> 313 <d:principal><d:href>/principals/baz</d:href></d:principal> 316 $server->httpRequest->setBody($body);
317 $server->addPlugin(
new DAV\Auth\Plugin());
321 $this->assertFalse($acl->httpAcl(
$server->httpRequest,
$server->httpResponse));
323 $this->assertEquals([
325 'principal' =>
'principals/foo',
326 'privilege' =>
'{DAV:}write',
330 'principal' =>
'principals/baz',
331 'privilege' =>
'{DAV:}write',
332 'protected' =>
false,
◆ testSuccessSimple()
Sabre\DAVACL\ACLMethodTest::testSuccessSimple |
( |
| ) |
|
Definition at line 47 of file ACLMethodTest.php.
50 new MockACLNode(
'test', []),
54 $server->httpRequest =
new HTTP\Request();
55 $server->httpRequest->setUrl(
'/test');
57 $body =
'<?xml version="1.0"?> 58 <d:acl xmlns:d="DAV:"> 60 $server->httpRequest->setBody($body);
61 $server->addPlugin(
new DAV\Auth\Plugin());
64 $this->assertFalse($acl->httpACL(
$server->httpRequest,
$server->httpResponse));
◆ testUnknownPrivilege()
Sabre\DAVACL\ACLMethodTest::testUnknownPrivilege |
( |
| ) |
|
Sabre
Definition at line 126 of file ACLMethodTest.php.
129 new MockACLNode(
'test', []),
133 $server->httpRequest =
new HTTP\Request(
'ACL',
'/test');
134 $body =
'<?xml version="1.0"?> 135 <d:acl xmlns:d="DAV:"> 137 <d:grant><d:privilege><d:bananas /></d:privilege></d:grant> 138 <d:principal><d:href>/principals/notfound</d:href></d:principal> 141 $server->httpRequest->setBody($body);
142 $server->addPlugin(
new DAV\Auth\Plugin());
◆ testUnrecognizedPrincipal()
Sabre\DAVACL\ACLMethodTest::testUnrecognizedPrincipal |
( |
| ) |
|
Sabre
Definition at line 71 of file ACLMethodTest.php.
74 new MockACLNode(
'test', []),
78 $server->httpRequest =
new HTTP\Request(
'ACL',
'/test');
79 $body =
'<?xml version="1.0"?> 80 <d:acl xmlns:d="DAV:"> 82 <d:grant><d:privilege><d:read /></d:privilege></d:grant> 83 <d:principal><d:href>/principals/notfound</d:href></d:principal> 86 $server->httpRequest->setBody($body);
87 $server->addPlugin(
new DAV\Auth\Plugin());
◆ testUnrecognizedPrincipal2()
Sabre\DAVACL\ACLMethodTest::testUnrecognizedPrincipal2 |
( |
| ) |
|
Sabre
Definition at line 97 of file ACLMethodTest.php.
100 new MockACLNode(
'test', []),
101 new DAV\SimpleCollection(
'principals', [
102 new DAV\SimpleCollection(
'notaprincipal'),
107 $server->httpRequest =
new HTTP\Request(
'ACL',
'/test');
108 $body =
'<?xml version="1.0"?> 109 <d:acl xmlns:d="DAV:"> 111 <d:grant><d:privilege><d:read /></d:privilege></d:grant> 112 <d:principal><d:href>/principals/notaprincipal</d:href></d:principal> 115 $server->httpRequest->setBody($body);
116 $server->addPlugin(
new DAV\Auth\Plugin());
◆ testUpdateProtectedPrivilege()
Sabre\DAVACL\ACLMethodTest::testUpdateProtectedPrivilege |
( |
| ) |
|
Sabre
Definition at line 181 of file ACLMethodTest.php.
185 'principal' =>
'principals/notfound',
186 'privilege' =>
'{DAV:}write',
192 new MockACLNode(
'test', $oldACL),
196 $server->httpRequest =
new HTTP\Request(
'ACL',
'/test');
197 $body =
'<?xml version="1.0"?> 198 <d:acl xmlns:d="DAV:"> 200 <d:grant><d:privilege><d:read /></d:privilege></d:grant> 201 <d:principal><d:href>/principals/notfound</d:href></d:principal> 204 $server->httpRequest->setBody($body);
205 $server->addPlugin(
new DAV\Auth\Plugin());
◆ testUpdateProtectedPrivilege2()
Sabre\DAVACL\ACLMethodTest::testUpdateProtectedPrivilege2 |
( |
| ) |
|
Sabre
Definition at line 215 of file ACLMethodTest.php.
219 'principal' =>
'principals/notfound',
220 'privilege' =>
'{DAV:}write',
226 new MockACLNode(
'test', $oldACL),
230 $server->httpRequest =
new HTTP\Request(
'ACL',
'/test');
231 $body =
'<?xml version="1.0"?> 232 <d:acl xmlns:d="DAV:"> 234 <d:grant><d:privilege><d:write /></d:privilege></d:grant> 235 <d:principal><d:href>/principals/foo</d:href></d:principal> 238 $server->httpRequest->setBody($body);
239 $server->addPlugin(
new DAV\Auth\Plugin());
◆ testUpdateProtectedPrivilege3()
Sabre\DAVACL\ACLMethodTest::testUpdateProtectedPrivilege3 |
( |
| ) |
|
Sabre
Definition at line 249 of file ACLMethodTest.php.
253 'principal' =>
'principals/notfound',
254 'privilege' =>
'{DAV:}write',
260 new MockACLNode(
'test', $oldACL),
264 $server->httpRequest =
new HTTP\Request(
'ACL',
'/test');
265 $body =
'<?xml version="1.0"?> 266 <d:acl xmlns:d="DAV:"> 268 <d:grant><d:privilege><d:write /></d:privilege></d:grant> 269 <d:principal><d:href>/principals/notfound</d:href></d:principal> 272 $server->httpRequest->setBody($body);
273 $server->addPlugin(
new DAV\Auth\Plugin());
The documentation for this class was generated from the following file: