24 'principaluri' =>
'principals/user1',
32 'calendardata' =>
'BEGIN:VCALENDAR
36DTEND;TZID=Europe/Berlin:20120207T191500
37RRULE:FREQ=DAILY;INTERVAL=1;COUNT=3
38SUMMARY:RecurringEvents 3 times
39DTSTART;TZID=Europe/Berlin:20120207T181500
42CREATED:20120207T111900Z
44DTEND;TZID=Europe/Berlin:20120208T191500
45SUMMARY:RecurringEvents 3 times OVERWRITTEN
46DTSTART;TZID=Europe/Berlin:20120208T181500
47RECURRENCE-ID;TZID=Europe/Berlin:20120208T181500
55 function testExpand() {
58 'REQUEST_METHOD' =>
'REPORT',
59 'HTTP_CONTENT_TYPE' =>
'application/xml',
60 'REQUEST_URI' =>
'/calendars/user1/calendar1',
64 $request->setBody(
'<?xml version="1.0" encoding="utf-8" ?>
65<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
68 <C:expand start="20120205T230000Z" end="20120212T225959Z"/>
73 <C:comp-filter name="VCALENDAR">
74 <C:comp-filter name="VEVENT">
75 <C:time-range start="20120205T230000Z" end="20120212T225959Z"/>
89 $body = str_replace(
' ',
'', $body);
94 $this->fail(
'Could not parse object. Error:' . $e->getMessage() .
' full object: ' .
$response->getBodyAsString());
98 foreach ($vObject->VEVENT as $vevent) {
100 foreach ($vevent->children() as $child) {
102 if ($child->name ==
'DTSTART') {
104 $this->assertContains($child->getValue(), [
'20120207T171500Z',
'20120208T171500Z',
'20120209T171500Z'],
'DTSTART is not a valid value: ' . $child->getValue());
105 } elseif ($child->name ==
'DTEND') {
107 $this->assertContains($child->getValue(), [
'20120207T181500Z',
'20120208T181500Z',
'20120209T181500Z'],
'DTEND is not a valid value: ' . $child->getValue());
foreach($paths as $path) $request
An exception for terminatinating execution or to throw for unit testing.
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.
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.
Exception thrown by Reader if an invalid object was attempted to be parsed.
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.