Definition at line 9 of file VAlarmTest.php.
◆ testInTimeRange()
Sabre\VObject\Component\VAlarmTest::testInTimeRange |
( |
VAlarm |
$valarm, |
|
|
|
$start, |
|
|
|
$end, |
|
|
|
$outcome |
|
) |
| |
◆ testInTimeRangeBuggy()
Sabre\VObject\Component\VAlarmTest::testInTimeRangeBuggy |
( |
| ) |
|
This bug was found and reported on the mailing list.
Definition at line 152 of file VAlarmTest.php.
References Sabre\VObject\$input, $vobj, and Sabre\VObject\Reader\read().
157 DTSTAMP:20121003T064931Z
158 UID:b848cb9a7bb16e464a06c222ca1f8102@examle.com
162 CATEGORIES:AlarmCategory
174 $this->assertTrue(
$vobj->VTODO->VALARM->isInTimeRange(
new \
DateTime(
'2012-10-01 00:00:00'),
new \
DateTime(
'2012-11-01 00:00:00')));
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
◆ testInTimeRangeInvalidComponent()
Sabre\VObject\Component\VAlarmTest::testInTimeRangeInvalidComponent |
( |
| ) |
|
Definition at line 135 of file VAlarmTest.php.
References $calendar.
138 $valarm =
$calendar->createComponent(
'VALARM');
139 $valarm->TRIGGER =
'-P1D';
140 $valarm->TRIGGER[
'RELATED'] =
'END';
142 $vjournal =
$calendar->createComponent(
'VJOURNAL');
143 $vjournal->add($valarm);
145 $valarm->isInTimeRange(
new DateTime(
'2012-02-25 01:00:00'),
new DateTime(
'2012-03-05 01:00:00'));
◆ timeRangeTestData()
Sabre\VObject\Component\VAlarmTest::timeRangeTestData |
( |
| ) |
|
Definition at line 20 of file VAlarmTest.php.
References $calendar, and $tests.
27 $valarm1 =
$calendar->createComponent(
'VALARM');
29 $calendar->createProperty(
'TRIGGER',
'20120312T130000Z', [
'VALUE' =>
'DATE-TIME'])
36 $valarm2 =
$calendar->createComponent(
'VALARM');
38 $calendar->createProperty(
'TRIGGER',
'-P1D', [
'VALUE' =>
'DURATION'])
41 $vevent2 =
$calendar->createComponent(
'VEVENT');
42 $vevent2->DTSTART =
'20120313T130000Z';
43 $vevent2->add($valarm2);
49 $valarm3 =
$calendar->createComponent(
'VALARM');
50 $valarm3->add(
$calendar->createProperty(
'TRIGGER',
'-P1D', [
'VALUE' =>
'DURATION',
'RELATED' =>
'END']));
52 $vevent3 =
$calendar->createComponent(
'VEVENT');
53 $vevent3->DTSTART =
'20120301T130000Z';
54 $vevent3->DTEND =
'20120401T130000Z';
55 $vevent3->add($valarm3);
61 $valarm4 =
$calendar->createComponent(
'VALARM');
62 $valarm4->TRIGGER =
'-P1D';
63 $valarm4->TRIGGER[
'VALUE'] =
'DURATION';
64 $valarm4->TRIGGER[
'RELATED'] =
'END';
66 $vtodo4 =
$calendar->createComponent(
'VTODO');
67 $vtodo4->DTSTART =
'20120301T130000Z';
68 $vtodo4->DUE =
'20120401T130000Z';
69 $vtodo4->add($valarm4);
75 $valarm5 =
$calendar->createComponent(
'VALARM');
76 $valarm5->TRIGGER =
'-P1D';
77 $valarm5->TRIGGER[
'VALUE'] =
'DURATION';
78 $valarm5->REPEAT = 10;
79 $valarm5->DURATION =
'P1D';
81 $vevent5 =
$calendar->createComponent(
'VEVENT');
82 $vevent5->DTSTART =
'20120301T130000Z';
83 $vevent5->add($valarm5);
88 $valarm6 =
$calendar->createComponent(
'VALARM');
89 $valarm6->TRIGGER =
'-P1D';
90 $valarm6->TRIGGER[
'VALUE'] =
'DURATION';
91 $valarm6->DURATION =
'P1D';
93 $vevent6 =
$calendar->createComponent(
'VEVENT');
94 $vevent6->DTSTART =
'20120313T130000Z';
95 $vevent6->add($valarm6);
102 $valarm7 =
$calendar->createComponent(
'VALARM');
103 $valarm7->TRIGGER =
'-P1D';
104 $valarm7->TRIGGER[
'VALUE'] =
'DURATION';
105 $valarm7->TRIGGER[
'RELATED'] =
'END';
107 $vevent7 =
$calendar->createComponent(
'VEVENT');
108 $vevent7->DTSTART =
'20120301T130000Z';
109 $vevent7->DURATION =
'P30D';
110 $vevent7->add($valarm7);
116 $valarm7 =
$calendar->createComponent(
'VALARM');
117 $valarm7->TRIGGER =
'-P1D';
118 $valarm7->TRIGGER[
'VALUE'] =
'DURATION';
119 $valarm7->TRIGGER[
'RELATED'] =
'END';
121 $vevent7 =
$calendar->createComponent(
'VEVENT');
122 $vevent7->DTSTART =
'20120301T130000Z';
123 $vevent7->add($valarm7);
The documentation for this class was generated from the following file:
- libs/composer/vendor/sabre/vobject/tests/VObject/Component/VAlarmTest.php