ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Issue211Test.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:20120418T172519CEST-3510gh1hVw
34DTSTAMP:20120418T152519Z
35DTSTART;VALUE=DATE:20120330
36DTEND;VALUE=DATE:20120531
37EXDATE;TZID=Europe/Berlin:20120330T000000
38RRULE:FREQ=YEARLY;INTERVAL=1
39SEQUENCE:1
40SUMMARY:Birthday
41TRANSP:TRANSPARENT
42BEGIN:VALARM
43ACTION:EMAIL
44ATTENDEE:MAILTO:xxx@domain.de
45DESCRIPTION:Dies ist eine Kalender Erinnerung
46SUMMARY:Kalender Alarm Erinnerung
47TRIGGER;VALUE=DATE-TIME:20120329T060000Z
48END:VALARM
49END:VEVENT
50END:VCALENDAR
51',
52 ],
53 ],
54 ];
55
56 function testIssue211() {
57
59 'REQUEST_METHOD' => 'REPORT',
60 'HTTP_CONTENT_TYPE' => 'application/xml',
61 'REQUEST_URI' => '/calendars/user1/calendar1',
62 'HTTP_DEPTH' => '1',
63 ]);
64
65 $request->setBody('<?xml version="1.0" encoding="utf-8" ?>
66<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
67 <D:prop>
68 <C:calendar-data/>
69 <D:getetag/>
70 </D:prop>
71 <C:filter>
72 <C:comp-filter name="VCALENDAR">
73 <C:comp-filter name="VEVENT">
74 <C:comp-filter name="VALARM">
75 <C:time-range start="20120426T220000Z" end="20120427T215959Z"/>
76 </C:comp-filter>
77 </C:comp-filter>
78 </C:comp-filter>
79 </C:filter>
80</C:calendar-query>');
81
82 $response = $this->request($request);
83
84 // if this assert is reached, the endless loop is gone
85 // There should be no matching events
86 $this->assertFalse(strpos('BEGIN:VEVENT', $response->body));
87
88 }
89}
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 for an endless loop in Sabre\CalDAV\CalendarQueryValidator.
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