ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Issue228Test.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\CalDAV;
4
5use Sabre\HTTP;
6
15
16 protected $setupCalDAV = true;
17
18 protected $caldavCalendars = [
19 [
20 'id' => 1,
21 'name' => 'Calendar',
22 'principaluri' => 'principals/user1',
23 'uri' => 'calendar1',
24 ]
25 ];
26
27 protected $caldavCalendarObjects = [
28 1 => [
29 'event.ics' => [
30 'calendardata' => 'BEGIN:VCALENDAR
31VERSION:2.0
32BEGIN:VEVENT
33UID:20120730T113415CEST-6804EGphkd@xxxxxx.de
34DTSTAMP:20120730T093415Z
35DTSTART;VALUE=DATE:20120729
36DTEND;VALUE=DATE:20120730
37SUMMARY:sunday event
38TRANSP:TRANSPARENT
39END:VEVENT
40END:VCALENDAR
41',
42 ],
43 ],
44 ];
45
46 function testIssue228() {
47
49 'REQUEST_METHOD' => 'REPORT',
50 'HTTP_CONTENT_TYPE' => 'application/xml',
51 'REQUEST_URI' => '/calendars/user1/calendar1',
52 'HTTP_DEPTH' => '1',
53 ]);
54
55 $request->setBody('<?xml version="1.0" encoding="utf-8" ?>
56<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
57 <D:prop>
58 <C:calendar-data>
59 <C:expand start="20120730T095609Z"
60 end="20120813T095609Z"/>
61</C:calendar-data>
62 <D:getetag/>
63 </D:prop>
64 <C:filter>
65 <C:comp-filter name="VCALENDAR">
66 <C:comp-filter name="VEVENT">
67 <C:time-range start="20120730T095609Z" end="20120813T095609Z"/>
68 </C:comp-filter>
69 </C:comp-filter>
70 </C:filter>
71</C:calendar-query>');
72
73 $response = $this->request($request);
74
75 // We must check if absolutely nothing was returned from this query.
76 $this->assertFalse(strpos($response->body, 'BEGIN:VCALENDAR'));
77
78 }
79}
foreach($paths as $path) $request
Definition: asyncclient.php:32
An exception for terminatinating execution or to throw for unit testing.
This unittest is created to check if the time-range filter is working correctly with all-day-events.
This class may be used as a basis for other webdav-related unittests.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107
$response