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

This unittest is created to check if queries for time-range include the start timestamp or not. More...

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

Public Member Functions

 testQueryTimerange ()
 
- 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 if queries for time-range include the start timestamp or not.

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

Definition at line 14 of file GetEventsByTimerangeTest.php.

Member Function Documentation

◆ testQueryTimerange()

Sabre\CalDAV\GetEventsByTimerangeTest::testQueryTimerange ( )

Definition at line 48 of file GetEventsByTimerangeTest.php.

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

48  {
49 
50  $request = new HTTP\Request(
51  'REPORT',
52  '/calendars/user1/calendar1',
53  [
54  'Content-Type' => 'application/xml',
55  'Depth' => '1',
56  ]
57  );
58 
59  $request->setBody('<?xml version="1.0" encoding="utf-8" ?>
60 <C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
61  <D:prop>
62  <C:calendar-data>
63  <C:expand start="20120226T220000Z" end="20120228T225959Z"/>
64  </C:calendar-data>
65  <D:getetag/>
66  </D:prop>
67  <C:filter>
68  <C:comp-filter name="VCALENDAR">
69  <C:comp-filter name="VEVENT">
70  <C:time-range start="20120226T220000Z" end="20120228T225959Z"/>
71  </C:comp-filter>
72  </C:comp-filter>
73  </C:filter>
74 </C:calendar-query>');
75 
76  $response = $this->request($request);
77 
78  $this->assertTrue(strpos($response->body, 'BEGIN:VCALENDAR') !== false);
79 
80  }
foreach($paths as $path) $request
Definition: asyncclient.php:32
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
$response
+ Here is the call graph for this function:

Field Documentation

◆ $caldavCalendarObjects

Sabre\CalDAV\GetEventsByTimerangeTest::$caldavCalendarObjects
protected
Initial value:
= [
1 => [
'event.ics' => [
'calendardata' => 'BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
CREATED:20120313T142342Z
UID:171EBEFC-C951-499D-B234-7BA7D677B45D
DTEND;TZID=Europe/Berlin:20120227T010000
TRANSP:OPAQUE
SUMMARY:Monday 0h
DTSTART;TZID=Europe/Berlin:20120227T000000
DTSTAMP:20120313T142416Z
SEQUENCE:4
END:VEVENT
END:VCALENDAR
'

Definition at line 27 of file GetEventsByTimerangeTest.php.

◆ $caldavCalendars

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

Definition at line 18 of file GetEventsByTimerangeTest.php.

◆ $setupCalDAV

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

Definition at line 16 of file GetEventsByTimerangeTest.php.


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