ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Issue166Test.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\CalDAV;
4 
5 use Sabre\VObject;
6 
8 
9  function testFlaw() {
10 
11  $input = <<<HI
12 BEGIN:VCALENDAR
13 PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
14 VERSION:2.0
15 BEGIN:VTIMEZONE
16 TZID:Asia/Pyongyang
17 X-LIC-LOCATION:Asia/Pyongyang
18 BEGIN:STANDARD
19 TZOFFSETFROM:+0900
20 TZOFFSETTO:+0900
21 TZNAME:KST
22 DTSTART:19700101T000000
23 END:STANDARD
24 END:VTIMEZONE
25 BEGIN:VEVENT
26 CREATED:20111118T010857Z
27 LAST-MODIFIED:20111118T010937Z
28 DTSTAMP:20111118T010937Z
29 UID:a03245b3-9947-9a48-a088-863c74e0fdd8
30 SUMMARY:New Event
31 RRULE:FREQ=YEARLY
32 DTSTART;TZID=Asia/Pyongyang:19960102T111500
33 DTEND;TZID=Asia/Pyongyang:19960102T121500
34 END:VEVENT
35 END:VCALENDAR
36 HI;
37 
38  $validator = new CalendarQueryValidator();
39 
40  $filters = [
41  'name' => 'VCALENDAR',
42  'comp-filters' => [
43  [
44  'name' => 'VEVENT',
45  'comp-filters' => [],
46  'prop-filters' => [],
47  'is-not-defined' => false,
48  'time-range' => [
49  'start' => new \DateTime('2011-12-01'),
50  'end' => new \DateTime('2012-02-01'),
51  ],
52  ],
53  ],
54  'prop-filters' => [],
55  'is-not-defined' => false,
56  'time-range' => null,
57  ];
59  $this->assertTrue($validator->validate($input, $filters));
60 
61  }
62 
63 }
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42