ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Issue211Test.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\CalDAV;
4 
5 use 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
31 VERSION:2.0
32 BEGIN:VEVENT
33 UID:20120418T172519CEST-3510gh1hVw
34 DTSTAMP:20120418T152519Z
35 DTSTART;VALUE=DATE:20120330
36 DTEND;VALUE=DATE:20120531
37 EXDATE;TZID=Europe/Berlin:20120330T000000
38 RRULE:FREQ=YEARLY;INTERVAL=1
39 SEQUENCE:1
40 SUMMARY:Birthday
41 TRANSP:TRANSPARENT
42 BEGIN:VALARM
43 ACTION:EMAIL
44 ATTENDEE:MAILTO:xxx@domain.de
45 DESCRIPTION:Dies ist eine Kalender Erinnerung
46 SUMMARY:Kalender Alarm Erinnerung
47 TRIGGER;VALUE=DATE-TIME:20120329T060000Z
48 END:VALARM
49 END:VEVENT
50 END: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
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
This unittest is created to check for an endless loop in Sabre.
$response