"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/Sabre/CalDAV/ExpandEventsDoubleEventsTest.php" between
dav-4.0.2.tar.gz and dav-4.0.3.tar.gz

About: sabre/dav is a WebDAV framework for PHP allowing to create WebDAV, CalDAV and CardDAV servers.

ExpandEventsDoubleEventsTest.php  (dav-4.0.2):ExpandEventsDoubleEventsTest.php  (dav-4.0.3)
skipping to change at line 87 skipping to change at line 87
<C:comp-filter name="VCALENDAR"> <C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT"> <C:comp-filter name="VEVENT">
<C:time-range start="20120205T230000Z" end="20120212T225959Z"/> <C:time-range start="20120205T230000Z" end="20120212T225959Z"/>
</C:comp-filter> </C:comp-filter>
</C:comp-filter> </C:comp-filter>
</C:filter> </C:filter>
</C:calendar-query>'); </C:calendar-query>');
$response = $this->request($request); $response = $this->request($request);
$bodyAsString = $response->getBodyAsString();
// Everts super awesome xml parser. // Everts super awesome xml parser.
$body = substr( $body = substr(
$response->body, $bodyAsString,
$start = strpos($response->body, 'BEGIN:VCALENDAR'), $start = strpos($bodyAsString, 'BEGIN:VCALENDAR'),
strpos($response->body, 'END:VCALENDAR') - $start + 13 strpos($bodyAsString, 'END:VCALENDAR') - $start + 13
); );
$body = str_replace('&#13;', '', $body); $body = str_replace('&#13;', '', $body);
$vObject = VObject\Reader::read($body); $vObject = VObject\Reader::read($body);
// We only expect 3 events // We only expect 3 events
$this->assertEquals(3, count($vObject->VEVENT), 'We got 6 events instead of 3. Output: '.$body); $this->assertEquals(3, count($vObject->VEVENT), 'We got 6 events instead of 3. Output: '.$body);
// TZID should be gone // TZID should be gone
$this->assertFalse(isset($vObject->VEVENT->DTSTART['TZID'])); $this->assertFalse(isset($vObject->VEVENT->DTSTART['TZID']));
 End of changes. 2 change blocks. 
3 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)