"Fossies" - the Fresh Open Source Software Archive  

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

ExpandEventsFloatingTimeTest.php  (dav-4.0.2):ExpandEventsFloatingTimeTest.php  (dav-4.0.3)
skipping to change at line 98 skipping to change at line 98
<C:comp-filter name="VCALENDAR"> <C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT"> <C:comp-filter name="VEVENT">
<C:time-range start="20141107T230000Z" end="20141108T225959Z"/> <C:time-range start="20141107T230000Z" end="20141108T225959Z"/>
</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);
// 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 */
foreach ($vevent->children() as $child) { foreach ($vevent->children() as $child) {
/** @var $child Sabre\VObject\Property */ /** @var $child Sabre\VObject\Property */
skipping to change at line 146 skipping to change at line 147
</C:calendar-data> </C:calendar-data>
<D:getetag/> <D:getetag/>
</D:prop> </D:prop>
<D:href>/calendars/user1/calendar1/event.ics</D:href> <D:href>/calendars/user1/calendar1/event.ics</D:href>
</C:calendar-multiget>'); </C:calendar-multiget>');
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(207, $response->getStatus()); $this->assertEquals(207, $response->getStatus());
$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);
// 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 */
foreach ($vevent->children() as $child) { foreach ($vevent->children() as $child) {
/** @var $child Sabre\VObject\Property */ /** @var $child Sabre\VObject\Property */
skipping to change at line 185 skipping to change at line 187
'Depth' => 1, 'Depth' => 1,
'Content-Type' => 'application/xml', 'Content-Type' => 'application/xml',
]); ]);
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(200, $response->getStatus()); $this->assertEquals(200, $response->getStatus());
// Everts super awesome xml parser. // Everts super awesome xml parser.
$body = substr( $body = substr(
$response->body, $response->getBodyAsString(),
$start = strpos($response->body, 'BEGIN:VCALENDAR'), $start = strpos($response->getBodyAsString(), 'BEGIN:VCALENDAR'),
strpos($response->body, 'END:VCALENDAR') - $start + 13 strpos($response->getBodyAsString(), 'END:VCALENDAR') - $start + 13
); );
$body = str_replace('&#13;', '', $body); $body = str_replace('&#13;', '', $body);
$vObject = VObject\Reader::read($body); $vObject = VObject\Reader::read($body);
// 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 */
foreach ($vevent->children() as $child) { foreach ($vevent->children() as $child) {
/** @var $child Sabre\VObject\Property */ /** @var $child Sabre\VObject\Property */
 End of changes. 5 change blocks. 
9 lines changed or deleted 11 lines changed or added

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