23 'principaluri' =>
'principals/user1',
31 'calendardata' =>
'BEGIN:VCALENDAR 35 DTEND;TZID=Europe/Berlin:20120207T191500 36 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU,TH 37 SUMMARY:RecurringEvents on tuesday and thursday 38 DTSTART;TZID=Europe/Berlin:20120207T181500 46 function testExpandRecurringByDayEvent() {
49 'REQUEST_METHOD' =>
'REPORT',
50 'HTTP_CONTENT_TYPE' =>
'application/xml',
51 'REQUEST_URI' =>
'/calendars/user1/calendar1',
55 $request->setBody(
'<?xml version="1.0" encoding="utf-8" ?> 56 <C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> 59 <C:expand start="20120210T230000Z" end="20120217T225959Z"/> 64 <C:comp-filter name="VCALENDAR"> 65 <C:comp-filter name="VEVENT"> 66 <C:time-range start="20120210T230000Z" end="20120217T225959Z"/> 70 </C:calendar-query>');
80 $body = str_replace(
' ',
'', $body);
84 $this->assertEquals(2, count($vObject->VEVENT));
87 foreach ($vObject->VEVENT as $vevent) {
89 foreach ($vevent->children() as $child) {
91 if ($child->name ==
'DTSTART') {
93 $this->assertContains($child->getValue(), [
'20120214T171500Z',
'20120216T171500Z'],
'DTSTART is not a valid value: ' . $child->getValue());
94 } elseif ($child->name ==
'DTEND') {
96 $this->assertContains($child->getValue(), [
'20120214T181500Z',
'20120216T181500Z'],
'DTEND is not a valid value: ' . $child->getValue());
foreach($paths as $path) $request
This unittests is created to find out why recurring events have wrong DTSTART value.
This class may be used as a basis for other webdav-related unittests.
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
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.