"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.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.

ExpandEventsDTSTARTandDTENDbyDayTest.php  (dav-4.0.2):ExpandEventsDTSTARTandDTENDbyDayTest.php  (dav-4.0.3)
skipping to change at line 76 skipping to change at line 76
<C:comp-filter name="VCALENDAR"> <C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT"> <C:comp-filter name="VEVENT">
<C:time-range start="20120210T230000Z" end="20120217T225959Z"/> <C:time-range start="20120210T230000Z" end="20120217T225959Z"/>
</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);
$this->assertEquals(2, count($vObject->VEVENT)); $this->assertEquals(2, count($vObject->VEVENT));
// check if DTSTARTs and DTENDs are correct // check if DTSTARTs and DTENDs are correct
foreach ($vObject->VEVENT as $vevent) { foreach ($vObject->VEVENT as $vevent) {
/** @var $vevent Sabre\VObject\Component\VEvent */ /** @var $vevent Sabre\VObject\Component\VEvent */
 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)