1, 'name' => 'Calendar', 'principaluri' => 'principals/user1', 'uri' => 'calendar1', ) ); protected $caldavCalendarObjects = array( 1 => array( 'event.ics' => array( 'calendardata' => 'BEGIN:VCALENDAR VERSION:2.0 BEGIN:VEVENT UID:foobar DTEND;TZID=Europe/Berlin:20120207T191500 RRULE:FREQ=DAILY;INTERVAL=1;COUNT=3 SUMMARY:RecurringEvents 3 times DTSTART;TZID=Europe/Berlin:20120207T181500 END:VEVENT BEGIN:VEVENT CREATED:20120207T111900Z UID:foobar DTEND;TZID=Europe/Berlin:20120208T191500 SUMMARY:RecurringEvents 3 times OVERWRITTEN DTSTART;TZID=Europe/Berlin:20120208T181500 RECURRENCE-ID;TZID=Europe/Berlin:20120208T181500 END:VEVENT END:VCALENDAR ', ), ), ); function testExpand() { $request = new Sabre_HTTP_Request(array( 'REQUEST_METHOD' => 'REPORT', 'HTTP_CONTENT_TYPE' => 'application/xml', 'REQUEST_URI' => '/calendars/user1/calendar1', 'HTTP_DEPTH' => '1', )); $request->setBody(' '); $response = $this->request($request); // Everts super awesome xml parser. $body = substr( $response->body, $start = strpos($response->body, 'BEGIN:VCALENDAR'), strpos($response->body, 'END:VCALENDAR') - $start + 13 ); $body = str_replace(' ','',$body); $vObject = VObject\Reader::read($body); // We only expect 3 events $this->assertEquals(3, count($vObject->VEVENT),'We got 6 events instead of 3. Output: ' . $body); // TZID should be gone $this->assertFalse(isset($vObject->VEVENT->DTSTART['TZID'])); } }