ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAVACL\AclPrincipalPropSetReportTest Class Reference
+ Inheritance diagram for Sabre\DAVACL\AclPrincipalPropSetReportTest:
+ Collaboration diagram for Sabre\DAVACL\AclPrincipalPropSetReportTest:

Public Member Functions

 testReport ()
 
 testReportDepth1 ()
 
- Public Member Functions inherited from Sabre\DAVServerTest
 setUp ()
 
 initializeEverything ()
 
 request ($request, $expectedStatus=null)
 Makes a request, and returns a response object. More...
 
 autoLogin ($userName)
 This function takes a username and sets the server in a state where this user is logged in, and no longer requires an authentication check. More...
 
 setUpTree ()
 Override this to provide your own Tree for your test-case. More...
 
 setUpBackends ()
 
 assertHttpStatus ($expectedStatus, HTTP\Request $req)
 

Data Fields

 $setupACL = true
 
 $autoLogin = 'admin'
 

Additional Inherited Members

- Protected Attributes inherited from Sabre\DAVServerTest
 $setupCalDAV = false
 
 $setupCardDAV = false
 
 $setupACL = false
 
 $setupCalDAVSharing = false
 
 $setupCalDAVScheduling = false
 
 $setupCalDAVSubscriptions = false
 
 $setupCalDAVICSExport = false
 
 $setupLocks = false
 
 $setupFiles = false
 
 $setupSharing = false
 
 $setupPropertyStorage = false
 
 $caldavCalendars = []
 An array with calendars. More...
 
 $caldavCalendarObjects = []
 
 $carddavAddressBooks = []
 
 $carddavCards = []
 
 $server
 
 $tree = []
 
 $caldavBackend
 
 $carddavBackend
 
 $principalBackend
 
 $locksBackend
 
 $propertyStorageBackend
 
 $caldavPlugin
 
 $carddavPlugin
 
 $aclPlugin
 
 $caldavSharingPlugin
 
 $caldavSchedulePlugin
 
 $authPlugin
 
 $locksPlugin
 
 $sharingPlugin
 
 $propertyStoragePlugin
 
 $autoLogin = null
 If this string is set, we will automatically log in the user with this name. More...
 

Detailed Description

Definition at line 7 of file AclPrincipalPropSetReportTest.php.

Member Function Documentation

◆ testReport()

Sabre\DAVACL\AclPrincipalPropSetReportTest::testReport ( )

Definition at line 12 of file AclPrincipalPropSetReportTest.php.

12 {
13
14 $xml = <<<XML
15<?xml version="1.0"?>
16<acl-principal-prop-set xmlns="DAV:">
17 <prop>
18 <principal-URL />
19 <displayname />
20 </prop>
21</acl-principal-prop-set>
22XML;
23
24 $request = new Request('REPORT', '/principals/user1', ['Content-Type' => 'application/xml', 'Depth' => 0]);
25 $request->setBody($xml);
26
27 $response = $this->request($request, 207);
28
29 $expected = <<<XML
30<?xml version="1.0"?>
31<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
32 <d:response>
33 <d:href>/principals/admin/</d:href>
34 <d:propstat>
35 <d:prop>
36 <d:principal-URL><d:href>/principals/admin/</d:href></d:principal-URL>
37 <d:displayname>Admin</d:displayname>
38 </d:prop>
39 <d:status>HTTP/1.1 200 OK</d:status>
40 </d:propstat>
41 </d:response>
42</d:multistatus>
43XML;
44
45 $this->assertXmlStringEqualsXmlString(
46 $expected,
47 $response->getBodyAsString()
48 );
49
50 }
foreach($paths as $path) $request
Definition: asyncclient.php:32
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
$response

References $request, $response, $xml, and Sabre\DAVServerTest\request().

+ Here is the call graph for this function:

◆ testReportDepth1()

Sabre\DAVACL\AclPrincipalPropSetReportTest::testReportDepth1 ( )

Definition at line 52 of file AclPrincipalPropSetReportTest.php.

52 {
53
54 $xml = <<<XML
55<?xml version="1.0"?>
56<acl-principal-prop-set xmlns="DAV:">
57 <principal-URL />
58 <displayname />
59</acl-principal-prop-set>
60XML;
61
62 $request = new Request('REPORT', '/principals/user1', ['Content-Type' => 'application/xml', 'Depth' => 1]);
63 $request->setBody($xml);
64
65 $this->request($request, 400);
66
67 }

References $request, $xml, and Sabre\DAVServerTest\request().

+ Here is the call graph for this function:

Field Documentation

◆ $autoLogin

Sabre\DAVACL\AclPrincipalPropSetReportTest::$autoLogin = 'admin'

Definition at line 10 of file AclPrincipalPropSetReportTest.php.

◆ $setupACL

Sabre\DAVACL\AclPrincipalPropSetReportTest::$setupACL = true

Definition at line 9 of file AclPrincipalPropSetReportTest.php.


The documentation for this class was generated from the following file: