3 class Sabre_CalDAV_Issue172Test extends PHPUnit_Framework_TestCase {
5 // DateTimeZone() native name: America/Los_Angeles (GMT-8 in January)
6 function testBuiltInTimezoneName() {
11 DTSTART;TZID=America/Los_Angeles:20120118T204500
12 DTEND;TZID=America/Los_Angeles:20120118T214500
16 $validator = new Sabre_CalDAV_CalendarQueryValidator();
18 'name' => 'VCALENDAR',
19 'comp-filters' => array(
22 'comp-filters' => array(),
23 'prop-filters' => array(),
24 'is-not-defined' => false,
25 'time-range' => array(
26 'start' => new DateTime('2012-01-18 21:00:00 GMT-08:00'),
27 'end' => new DateTime('2012-01-18 21:00:00 GMT-08:00'),
31 'prop-filters' => array(),
33 $input = Sabre_VObject_Reader::read($input);
34 $this->assertTrue($validator->validate($input,$filters));
37 // Pacific Standard Time, translates to America/Los_Angeles (GMT-8 in January)
38 function testOutlookTimezoneName() {
43 TZID:Pacific Standard Time
45 DTSTART:16010101T030000
48 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
51 DTSTART:16010101T020000
54 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
58 DTSTART;TZID=Pacific Standard Time:20120113T100000
59 DTEND;TZID=Pacific Standard Time:20120113T110000
63 $validator = new Sabre_CalDAV_CalendarQueryValidator();
65 'name' => 'VCALENDAR',
66 'comp-filters' => array(
69 'comp-filters' => array(),
70 'prop-filters' => array(),
71 'is-not-defined' => false,
72 'time-range' => array(
73 'start' => new DateTime('2012-01-13 10:30:00 GMT-08:00'),
74 'end' => new DateTime('2012-01-13 10:30:00 GMT-08:00'),
78 'prop-filters' => array(),
80 $input = Sabre_VObject_Reader::read($input);
81 $this->assertTrue($validator->validate($input,$filters));
84 // X-LIC-LOCATION, translates to America/Los_Angeles (GMT-8 in January)
85 function testLibICalLocationName() {
90 TZID:My own timezone name
91 X-LIC-LOCATION:America/Los_Angeles
93 DTSTART:16010101T030000
96 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
99 DTSTART:16010101T020000
102 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
106 DTSTART;TZID=My own timezone name:20120113T100000
107 DTEND;TZID=My own timezone name:20120113T110000
111 $validator = new Sabre_CalDAV_CalendarQueryValidator();
113 'name' => 'VCALENDAR',
114 'comp-filters' => array(
117 'comp-filters' => array(),
118 'prop-filters' => array(),
119 'is-not-defined' => false,
120 'time-range' => array(
121 'start' => new DateTime('2012-01-13 10:30:00 GMT-08:00'),
122 'end' => new DateTime('2012-01-13 10:30:00 GMT-08:00'),
126 'prop-filters' => array(),
128 $input = Sabre_VObject_Reader::read($input);
129 $this->assertTrue($validator->validate($input,$filters));