Definition at line 7 of file PrincipalMatchTest.php.
◆ testPrincipalMatch()
Sabre\DAVACL\PrincipalMatchTest::testPrincipalMatch |
( |
| ) |
|
Definition at line 12 of file PrincipalMatchTest.php.
12 {
13
15<?xml version="1.0"?>
16<principal-match xmlns="DAV:">
17 <self />
18</principal-match>
19XML;
20
21 $request =
new Request(
'REPORT',
'/principals', [
'Content-Type' =>
'application/xml']);
23
25
26 $expected = <<<XML
27<?xml version="1.0"?>
28<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
29 <d:status>HTTP/1.1 200 OK</d:status>
30 <d:href>/principals/user1</d:href>
31 <d:propstat>
32 <d:prop/>
33 <d:status>HTTP/1.1 418
I'm a teapot</d:status>
34 </d:propstat>
35</d:multistatus>
36XML;
37
38 $this->assertXmlStringEqualsXmlString(
39 $expected,
40 $response->getBodyAsString()
41 );
42
43 }
foreach($paths as $path) $request
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
References $request, $response, $xml, and Sabre\DAVServerTest\request().
◆ testPrincipalMatchPrincipalProperty()
Sabre\DAVACL\PrincipalMatchTest::testPrincipalMatchPrincipalProperty |
( |
| ) |
|
Definition at line 83 of file PrincipalMatchTest.php.
83 {
84
86<?xml version="1.0"?>
87<principal-match xmlns="DAV:">
88 <principal-property>
89 <principal-URL />
90 </principal-property>
91 <prop>
92 <resourcetype />
93 </prop>
94</principal-match>
95XML;
96
97 $request =
new Request(
'REPORT',
'/principals', [
'Content-Type' =>
'application/xml']);
99
101
102 $expected = <<<XML
103<?xml version="1.0"?>
104<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
105 <d:status>HTTP/1.1 200 OK</d:status>
106 <d:href>/principals/user1/</d:href>
107 <d:propstat>
108 <d:prop>
109 <d:resourcetype><d:principal/></d:resourcetype>
110 </d:prop>
111 <d:status>HTTP/1.1 200 OK</d:status>
112 </d:propstat>
113</d:multistatus>
114XML;
115
116 $this->assertXmlStringEqualsXmlString(
117 $expected,
119 );
120
121 }
◆ testPrincipalMatchProp()
Sabre\DAVACL\PrincipalMatchTest::testPrincipalMatchProp |
( |
| ) |
|
Definition at line 45 of file PrincipalMatchTest.php.
45 {
46
48<?xml version="1.0"?>
49<principal-match xmlns="DAV:">
50 <self />
51 <prop>
52 <resourcetype />
53 </prop>
54</principal-match>
55XML;
56
57 $request =
new Request(
'REPORT',
'/principals', [
'Content-Type' =>
'application/xml']);
59
61
62 $expected = <<<XML
63<?xml version="1.0"?>
64<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
65 <d:status>HTTP/1.1 200 OK</d:status>
66 <d:href>/principals/user1/</d:href>
67 <d:propstat>
68 <d:prop>
69 <d:resourcetype><d:principal/></d:resourcetype>
70 </d:prop>
71 <d:status>HTTP/1.1 200 OK</d:status>
72 </d:propstat>
73</d:multistatus>
74XML;
75
76 $this->assertXmlStringEqualsXmlString(
77 $expected,
79 );
80
81 }
◆ $autoLogin
Sabre\DAVACL\PrincipalMatchTest::$autoLogin = 'user1' |
◆ $setupACL
Sabre\DAVACL\PrincipalMatchTest::$setupACL = true |
The documentation for this class was generated from the following file: