ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\CalDAV\Issue220Test Class Reference

This unittest is created to check for an endless loop in CalendarQueryValidator. More...

+ Inheritance diagram for Sabre\CalDAV\Issue220Test:
+ Collaboration diagram for Sabre\CalDAV\Issue220Test:

Public Member Functions

 testIssue220 ()
 
- 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)
 

Protected Attributes

 $setupCalDAV = true
 
 $caldavCalendars
 
 $caldavCalendarObjects
 
- 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

This unittest is created to check for an endless loop in CalendarQueryValidator.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 14 of file Issue220Test.php.

Member Function Documentation

◆ testIssue220()

Sabre\CalDAV\Issue220Test::testIssue220 ( )

Definition at line 66 of file Issue220Test.php.

References $request, $response, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAVServerTest\request().

66  {
67 
69  'REQUEST_METHOD' => 'REPORT',
70  'HTTP_CONTENT_TYPE' => 'application/xml',
71  'REQUEST_URI' => '/calendars/user1/calendar1',
72  'HTTP_DEPTH' => '1',
73  ]);
74 
75  $request->setBody('<?xml version="1.0" encoding="utf-8" ?>
76 <C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
77  <D:prop>
78  <C:calendar-data/>
79  <D:getetag/>
80  </D:prop>
81  <C:filter>
82  <C:comp-filter name="VCALENDAR">
83  <C:comp-filter name="VEVENT">
84  <C:comp-filter name="VALARM">
85  <C:time-range start="20120607T161646Z" end="20120612T161646Z"/>
86  </C:comp-filter>
87  </C:comp-filter>
88  </C:comp-filter>
89  </C:filter>
90 </C:calendar-query>');
91 
92  $response = $this->request($request);
93 
94  $this->assertFalse(strpos($response->body, '<s:exception>PHPUnit_Framework_Error_Warning</s:exception>'), 'Error Warning occurred: ' . $response->body);
95  $this->assertFalse(strpos($response->body, 'Invalid argument supplied for foreach()'), 'Invalid argument supplied for foreach(): ' . $response->body);
96 
97  $this->assertEquals(207, $response->status);
98  }
foreach($paths as $path) $request
Definition: asyncclient.php:32
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
$response
+ Here is the call graph for this function:

Field Documentation

◆ $caldavCalendarObjects

Sabre\CalDAV\Issue220Test::$caldavCalendarObjects
protected

Definition at line 27 of file Issue220Test.php.

◆ $caldavCalendars

Sabre\CalDAV\Issue220Test::$caldavCalendars
protected
Initial value:
= [
[
'id' => 1,
'name' => 'Calendar'

Definition at line 18 of file Issue220Test.php.

◆ $setupCalDAV

Sabre\CalDAV\Issue220Test::$setupCalDAV = true
protected

Definition at line 16 of file Issue220Test.php.


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