4 * This unittest is created to check if the time-range filter is working correctly with all-day-events
6 * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
7 * @author Evert Pot (http://www.rooftopsolutions.nl/)
8 * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
10 class Sabre_CalDAV_Issue228Test extends Sabre_DAVServerTest {
12 protected $setupCalDAV = true;
14 protected $caldavCalendars = array(
18 'principaluri' => 'principals/user1',
23 protected $caldavCalendarObjects = array(
26 'calendardata' => 'BEGIN:VCALENDAR
29 UID:20120730T113415CEST-6804EGphkd@xxxxxx.de
30 DTSTAMP:20120730T093415Z
31 DTSTART;VALUE=DATE:20120729
32 DTEND;VALUE=DATE:20120730
42 function testIssue228() {
44 $request = new Sabre_HTTP_Request(array(
45 'REQUEST_METHOD' => 'REPORT',
46 'HTTP_CONTENT_TYPE' => 'application/xml',
47 'REQUEST_URI' => '/calendars/user1/calendar1',
51 $request->setBody('<?xml version="1.0" encoding="utf-8" ?>
52 <C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
55 <C:expand start="20120730T095609Z"
56 end="20120813T095609Z"/>
61 <C:comp-filter name="VCALENDAR">
62 <C:comp-filter name="VEVENT">
63 <C:time-range start="20120730T095609Z" end="20120813T095609Z"/>
67 </C:calendar-query>');
69 $response = $this->request($request);
71 // We must check if absolutely nothing was returned from this query.
72 $this->assertFalse(strpos($response->body, 'BEGIN:VCALENDAR'));