5 class Sabre_CalDAV_Issue172Test extends PHPUnit_Framework_TestCase {
7 // DateTimeZone() native name: America/Los_Angeles (GMT-8 in January)
8 function testBuiltInTimezoneName() {
13 DTSTART;TZID=America/Los_Angeles:20120118T204500
14 DTEND;TZID=America/Los_Angeles:20120118T214500
18 $validator = new Sabre_CalDAV_CalendarQueryValidator();
20 'name' => 'VCALENDAR',
21 'comp-filters' => array(
24 'comp-filters' => array(),
25 'prop-filters' => array(),
26 'is-not-defined' => false,
27 'time-range' => array(
28 'start' => new DateTime('2012-01-18 21:00:00 GMT-08:00'),
29 'end' => new DateTime('2012-01-18 21:00:00 GMT-08:00'),
33 'prop-filters' => array(),
35 $input = VObject\Reader::read($input);
36 $this->assertTrue($validator->validate($input,$filters));
39 // Pacific Standard Time, translates to America/Los_Angeles (GMT-8 in January)
40 function testOutlookTimezoneName() {
45 TZID:Pacific Standard Time
47 DTSTART:16010101T030000
50 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
53 DTSTART:16010101T020000
56 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
60 DTSTART;TZID=Pacific Standard Time:20120113T100000
61 DTEND;TZID=Pacific Standard Time:20120113T110000
65 $validator = new Sabre_CalDAV_CalendarQueryValidator();
67 'name' => 'VCALENDAR',
68 'comp-filters' => array(
71 'comp-filters' => array(),
72 'prop-filters' => array(),
73 'is-not-defined' => false,
74 'time-range' => array(
75 'start' => new DateTime('2012-01-13 10:30:00 GMT-08:00'),
76 'end' => new DateTime('2012-01-13 10:30:00 GMT-08:00'),
80 'prop-filters' => array(),
82 $input = VObject\Reader::read($input);
83 $this->assertTrue($validator->validate($input,$filters));
86 // X-LIC-LOCATION, translates to America/Los_Angeles (GMT-8 in January)
87 function testLibICalLocationName() {
92 TZID:My own timezone name
93 X-LIC-LOCATION:America/Los_Angeles
95 DTSTART:16010101T030000
98 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
101 DTSTART:16010101T020000
104 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
108 DTSTART;TZID=My own timezone name:20120113T100000
109 DTEND;TZID=My own timezone name:20120113T110000
113 $validator = new Sabre_CalDAV_CalendarQueryValidator();
115 'name' => 'VCALENDAR',
116 'comp-filters' => array(
119 'comp-filters' => array(),
120 'prop-filters' => array(),
121 'is-not-defined' => false,
122 'time-range' => array(
123 'start' => new DateTime('2012-01-13 10:30:00 GMT-08:00'),
124 'end' => new DateTime('2012-01-13 10:30:00 GMT-08:00'),
128 'prop-filters' => array(),
130 $input = VObject\Reader::read($input);
131 $this->assertTrue($validator->validate($input,$filters));