ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\FreeBusyGeneratorTest Class Reference
+ Inheritance diagram for Sabre\VObject\FreeBusyGeneratorTest:
+ Collaboration diagram for Sabre\VObject\FreeBusyGeneratorTest:

Public Member Functions

 testGeneratorBaseObject ()
 
 testInvalidArg ()
 @expectedException InvalidArgumentException More...
 
 assertFreeBusyReport ($expected, $input, $timeZone=null, $vavailability=null)
 This function takes a list of objects (icalendar objects), and turns them into a freebusy report. More...
 
 testSimple ()
 
 testSource ()
 
 testOpaque ()
 Testing TRANSP:OPAQUE. More...
 
 testTransparent ()
 Testing TRANSP:TRANSPARENT. More...
 
 testCancelled ()
 Testing STATUS:CANCELLED. More...
 
 testTentative ()
 Testing STATUS:TENTATIVE. More...
 
 testOutsideTimeRange ()
 Testing an event that falls outside of the report time-range. More...
 
 testOutsideTimeRange2 ()
 Testing an event that falls outside of the report time-range. More...
 
 testDuration ()
 Testing an event that uses DURATION. More...
 
 testAllDay ()
 Testing an all-day event. More...
 
 testNoDuration ()
 Testing an event that has no end or duration. More...
 
 testObject ()
 Testing feeding the freebusy generator an object instead of a string. More...
 
 testVFreeBusy ()
 Testing feeding VFREEBUSY objects instead of VEVENT. More...
 
 testYearlyRecurrence ()
 
 testYearlyRecurrenceDuration ()
 
 testFloatingTime ()
 
 testFloatingTimeReferenceTimeZone ()
 
 testAllDay2 ()
 
 testAllDayReferenceTimeZone ()
 
 testNoValidInstances ()
 
 testVAvailabilitySimple ()
 This VAVAILABILITY object overlaps with the time-range, but we're just busy the entire time. More...
 
 testVAvailabilityIrrelevant ()
 This VAVAILABILITY object does not overlap at all with the freebusy report, so it should be ignored. More...
 
 testVAvailabilityOfficeHours ()
 This VAVAILABILITY object has a 9am-5pm AVAILABLE object for office hours. More...
 
 testVAvailabilityOfficeHoursVacation ()
 This test has the same office hours, but has a vacation blocked off for the relevant time, using a higher priority. More...
 
 testVAvailabilityOfficeHoursVacation2 ()
 This test has the same input as the last, except somebody mixed up the PRIORITY values. More...
 

Detailed Description

Definition at line 7 of file FreeBusyGeneratorTest.php.

Member Function Documentation

◆ assertFreeBusyReport()

Sabre\VObject\FreeBusyGeneratorTest::assertFreeBusyReport (   $expected,
  $input,
  $timeZone = null,
  $vavailability = null 
)

This function takes a list of objects (icalendar objects), and turns them into a freebusy report.

Then it takes the expected output and compares it to what we actually got.

It only generates the freebusy report for the following time-range: 2011-01-01 11:00:00 until 2011-01-03 11:11:11

Parameters
string$expected
array$input
string | null$timeZone
string$vavailability
Returns
void

Definition at line 55 of file FreeBusyGeneratorTest.php.

55 {
56
57 $gen = new FreeBusyGenerator(
58 new \DateTime('20110101T110000Z', new \DateTimeZone('UTC')),
59 new \DateTime('20110103T110000Z', new \DateTimeZone('UTC')),
60 $input,
62 );
63
64 if ($vavailability) {
65 if (is_string($vavailability)) {
66 $vavailability = Reader::read($vavailability);
67 }
68 $gen->setVAvailability($vavailability);
69 }
70
71 $output = $gen->getResult();
72
73 // Removing DTSTAMP because it changes every time.
74 unset($output->VFREEBUSY->DTSTAMP);
75
76 $expected = <<<ICS
77BEGIN:VCALENDAR
78VERSION:2.0
79BEGIN:VFREEBUSY
80DTSTART:20110101T110000Z
81DTEND:20110103T110000Z
82$expected
83END:VFREEBUSY
84END:VCALENDAR
85ICS;
86
87 $this->assertVObjectEqualsVObject($expected, $output);
88
89 }
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
foreach($paths as $path) if($argc< 3) $input

References Sabre\VObject\$input, Sabre\VObject\$output, $timeZone, and Sabre\VObject\Reader\read().

Referenced by Sabre\VObject\FreeBusyGeneratorTest\testAllDay(), Sabre\VObject\FreeBusyGeneratorTest\testAllDay2(), Sabre\VObject\FreeBusyGeneratorTest\testAllDayReferenceTimeZone(), Sabre\VObject\FreeBusyGeneratorTest\testCancelled(), Sabre\VObject\FreeBusyGeneratorTest\testDuration(), Sabre\VObject\FreeBusyGeneratorTest\testFloatingTime(), Sabre\VObject\FreeBusyGeneratorTest\testFloatingTimeReferenceTimeZone(), Sabre\VObject\FreeBusyGeneratorTest\testNoDuration(), Sabre\VObject\FreeBusyGeneratorTest\testNoValidInstances(), Sabre\VObject\FreeBusyGeneratorTest\testObject(), Sabre\VObject\FreeBusyGeneratorTest\testOpaque(), Sabre\VObject\FreeBusyGeneratorTest\testOutsideTimeRange(), Sabre\VObject\FreeBusyGeneratorTest\testOutsideTimeRange2(), Sabre\VObject\FreeBusyGeneratorTest\testSimple(), Sabre\VObject\FreeBusyGeneratorTest\testSource(), Sabre\VObject\FreeBusyGeneratorTest\testTentative(), Sabre\VObject\FreeBusyGeneratorTest\testTransparent(), Sabre\VObject\FreeBusyGeneratorTest\testVAvailabilityIrrelevant(), Sabre\VObject\FreeBusyGeneratorTest\testVAvailabilityOfficeHours(), Sabre\VObject\FreeBusyGeneratorTest\testVAvailabilityOfficeHoursVacation(), Sabre\VObject\FreeBusyGeneratorTest\testVAvailabilityOfficeHoursVacation2(), Sabre\VObject\FreeBusyGeneratorTest\testVAvailabilitySimple(), Sabre\VObject\FreeBusyGeneratorTest\testVFreeBusy(), Sabre\VObject\FreeBusyGeneratorTest\testYearlyRecurrence(), and Sabre\VObject\FreeBusyGeneratorTest\testYearlyRecurrenceDuration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testAllDay()

Sabre\VObject\FreeBusyGeneratorTest::testAllDay ( )

Testing an all-day event.

Definition at line 301 of file FreeBusyGeneratorTest.php.

301 {
302
303 // Day-long event, shows up
304 $blob = <<<ICS
305BEGIN:VCALENDAR
306BEGIN:VEVENT
307UID:foobar9
308DTSTART;VALUE=DATE:20110102
309END:VEVENT
310END:VCALENDAR
311ICS;
312
314 'FREEBUSY:20110102T000000Z/20110103T000000Z',
315 $blob
316 );
317
318 }
assertFreeBusyReport($expected, $input, $timeZone=null, $vavailability=null)
This function takes a list of objects (icalendar objects), and turns them into a freebusy report.

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testAllDay2()

Sabre\VObject\FreeBusyGeneratorTest::testAllDay2 ( )

Definition at line 475 of file FreeBusyGeneratorTest.php.

475 {
476
477 // All-day event, slightly outside of the VFREEBUSY range.
478 $blob = <<<ICS
479BEGIN:VCALENDAR
480BEGIN:VEVENT
481UID:foobar
482DTSTART;VALUE=DATE:20110101
483END:VEVENT
484END:VCALENDAR
485ICS;
486
488 "FREEBUSY:20110101T110000Z/20110102T000000Z",
489 $blob
490 );
491
492 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testAllDayReferenceTimeZone()

Sabre\VObject\FreeBusyGeneratorTest::testAllDayReferenceTimeZone ( )

Definition at line 494 of file FreeBusyGeneratorTest.php.

494 {
495
496 // All-day event + reference timezone
497 $blob = <<<ICS
498BEGIN:VCALENDAR
499BEGIN:VEVENT
500UID:foobar
501DTSTART;VALUE=DATE:20110101
502END:VEVENT
503END:VCALENDAR
504ICS;
505
507 "FREEBUSY:20110101T110000Z/20110102T050000Z",
508 $blob,
509 new \DateTimeZone('America/Toronto')
510 );
511
512 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testCancelled()

Sabre\VObject\FreeBusyGeneratorTest::testCancelled ( )

Testing STATUS:CANCELLED.

Definition at line 184 of file FreeBusyGeneratorTest.php.

184 {
185
186 // transparent, hidden
187 $blob = <<<ICS
188BEGIN:VCALENDAR
189BEGIN:VEVENT
190UID:foobar4
191STATUS:CANCELLED
192DTSTART:20110101T160000Z
193DTEND:20110101T170000Z
194END:VEVENT
195END:VCALENDAR
196ICS;
197
199 "",
200 $blob
201 );
202
203 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testDuration()

Sabre\VObject\FreeBusyGeneratorTest::testDuration ( )

Testing an event that uses DURATION.

Definition at line 278 of file FreeBusyGeneratorTest.php.

278 {
279
280 // using duration, shows up
281 $blob = <<<ICS
282BEGIN:VCALENDAR
283BEGIN:VEVENT
284UID:foobar8
285DTSTART:20110101T190000Z
286DURATION:PT1H
287END:VEVENT
288END:VCALENDAR
289ICS;
290
292 'FREEBUSY:20110101T190000Z/20110101T200000Z',
293 $blob
294 );
295
296 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testFloatingTime()

Sabre\VObject\FreeBusyGeneratorTest::testFloatingTime ( )

Definition at line 434 of file FreeBusyGeneratorTest.php.

434 {
435
436 // Floating time, no timezone
437 $blob = <<<ICS
438BEGIN:VCALENDAR
439BEGIN:VEVENT
440UID:foobar
441DTSTART:20110101T120000
442DTEND:20110101T130000
443END:VEVENT
444END:VCALENDAR
445ICS;
446
448 "FREEBUSY:20110101T120000Z/20110101T130000Z",
449 $blob
450 );
451
452 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testFloatingTimeReferenceTimeZone()

Sabre\VObject\FreeBusyGeneratorTest::testFloatingTimeReferenceTimeZone ( )

Definition at line 454 of file FreeBusyGeneratorTest.php.

454 {
455
456 // Floating time + reference timezone
457 $blob = <<<ICS
458BEGIN:VCALENDAR
459BEGIN:VEVENT
460UID:foobar
461DTSTART:20110101T120000
462DTEND:20110101T130000
463END:VEVENT
464END:VCALENDAR
465ICS;
466
468 "FREEBUSY:20110101T170000Z/20110101T180000Z",
469 $blob,
470 new \DateTimeZone('America/Toronto')
471 );
472
473 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testGeneratorBaseObject()

Sabre\VObject\FreeBusyGeneratorTest::testGeneratorBaseObject ( )

Definition at line 11 of file FreeBusyGeneratorTest.php.

11 {
12
13 $obj = new Component\VCalendar();
14 $obj->METHOD = 'PUBLISH';
15
16 $gen = new FreeBusyGenerator();
17 $gen->setObjects([]);
18 $gen->setBaseObject($obj);
19
20 $result = $gen->getResult();
21
22 $this->assertEquals('PUBLISH', $result->METHOD->getValue());
23
24 }
$result

References $result.

◆ testInvalidArg()

Sabre\VObject\FreeBusyGeneratorTest::testInvalidArg ( )

@expectedException InvalidArgumentException

Definition at line 29 of file FreeBusyGeneratorTest.php.

29 {
30
31 $gen = new FreeBusyGenerator(
32 new \DateTime('2012-01-01'),
33 new \DateTime('2012-12-31'),
34 new \StdClass()
35 );
36
37 }

◆ testNoDuration()

Sabre\VObject\FreeBusyGeneratorTest::testNoDuration ( )

Testing an event that has no end or duration.

Definition at line 323 of file FreeBusyGeneratorTest.php.

323 {
324
325 // No duration, does not show up
326 $blob = <<<ICS
327BEGIN:VCALENDAR
328BEGIN:VEVENT
329UID:foobar10
330DTSTART:20110101T200000Z
331END:VEVENT
332END:VCALENDAR
333ICS;
334
336 '',
337 $blob
338 );
339
340 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testNoValidInstances()

Sabre\VObject\FreeBusyGeneratorTest::testNoValidInstances ( )

Definition at line 514 of file FreeBusyGeneratorTest.php.

514 {
515
516 // Recurrence rule with no valid instances
517 $blob = <<<ICS
518BEGIN:VCALENDAR
519BEGIN:VEVENT
520UID:foobar
521DTSTART:20110101T100000Z
522DTEND:20110103T120000Z
523RRULE:FREQ=WEEKLY;COUNT=1
524EXDATE:20110101T100000Z
525END:VEVENT
526END:VCALENDAR
527ICS;
528
530 "",
531 $blob
532 );
533
534 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testObject()

Sabre\VObject\FreeBusyGeneratorTest::testObject ( )

Testing feeding the freebusy generator an object instead of a string.

Definition at line 345 of file FreeBusyGeneratorTest.php.

345 {
346
347 // encoded as object, shows up
348 $blob = <<<ICS
349BEGIN:VCALENDAR
350BEGIN:VEVENT
351UID:foobar11
352DTSTART:20110101T210000Z
353DURATION:PT1H
354END:VEVENT
355END:VCALENDAR
356ICS;
357
359 'FREEBUSY:20110101T210000Z/20110101T220000Z',
360 Reader::read($blob)
361 );
362
363
364 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport(), and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testOpaque()

Sabre\VObject\FreeBusyGeneratorTest::testOpaque ( )

Testing TRANSP:OPAQUE.

Definition at line 137 of file FreeBusyGeneratorTest.php.

137 {
138
139 $blob = <<<ICS
140BEGIN:VCALENDAR
141BEGIN:VEVENT
142UID:foobar2
143TRANSP:OPAQUE
144DTSTART:20110101T130000Z
145DTEND:20110101T140000Z
146END:VEVENT
147END:VCALENDAR
148ICS;
149
151 "FREEBUSY:20110101T130000Z/20110101T140000Z",
152 $blob
153 );
154
155 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testOutsideTimeRange()

Sabre\VObject\FreeBusyGeneratorTest::testOutsideTimeRange ( )

Testing an event that falls outside of the report time-range.

Definition at line 232 of file FreeBusyGeneratorTest.php.

232 {
233
234 // outside of time-range, hidden
235 $blob = <<<ICS
236BEGIN:VCALENDAR
237BEGIN:VEVENT
238UID:foobar6
239DTSTART:20110101T090000Z
240DTEND:20110101T100000Z
241END:VEVENT
242END:VCALENDAR
243ICS;
244
246 '',
247 $blob
248 );
249
250 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testOutsideTimeRange2()

Sabre\VObject\FreeBusyGeneratorTest::testOutsideTimeRange2 ( )

Testing an event that falls outside of the report time-range.

Definition at line 255 of file FreeBusyGeneratorTest.php.

255 {
256
257 // outside of time-range, hidden
258 $blob = <<<ICS
259BEGIN:VCALENDAR
260BEGIN:VEVENT
261UID:foobar7
262DTSTART:20110104T090000Z
263DTEND:20110104T100000Z
264END:VEVENT
265END:VCALENDAR
266ICS;
267
269 '',
270 $blob
271 );
272
273 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testSimple()

Sabre\VObject\FreeBusyGeneratorTest::testSimple ( )

Definition at line 91 of file FreeBusyGeneratorTest.php.

91 {
92
93 $blob = <<<ICS
94BEGIN:VCALENDAR
95BEGIN:VEVENT
96UID:foobar
97DTSTART:20110101T120000Z
98DTEND:20110101T130000Z
99END:VEVENT
100END:VCALENDAR
101ICS;
102
103
105 "FREEBUSY:20110101T120000Z/20110101T130000Z",
106 $blob
107 );
108
109 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testSource()

Sabre\VObject\FreeBusyGeneratorTest::testSource ( )

Definition at line 111 of file FreeBusyGeneratorTest.php.

111 {
112
113 $blob = <<<ICS
114BEGIN:VCALENDAR
115BEGIN:VEVENT
116UID:foobar
117DTSTART:20110101T120000Z
118DTEND:20110101T130000Z
119END:VEVENT
120END:VCALENDAR
121ICS;
122 $h = fopen('php://memory', 'r+');
123 fwrite($h, $blob);
124 rewind($h);
125
126
128 "FREEBUSY:20110101T120000Z/20110101T130000Z",
129 $h
130 );
131
132 }
$h

References $h, and Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testTentative()

Sabre\VObject\FreeBusyGeneratorTest::testTentative ( )

Testing STATUS:TENTATIVE.

Definition at line 208 of file FreeBusyGeneratorTest.php.

208 {
209
210 // tentative, shows up
211 $blob = <<<ICS
212BEGIN:VCALENDAR
213BEGIN:VEVENT
214UID:foobar5
215STATUS:TENTATIVE
216DTSTART:20110101T180000Z
217DTEND:20110101T190000Z
218END:VEVENT
219END:VCALENDAR
220ICS;
221
223 'FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T180000Z/20110101T190000Z',
224 $blob
225 );
226
227 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testTransparent()

Sabre\VObject\FreeBusyGeneratorTest::testTransparent ( )

Testing TRANSP:TRANSPARENT.

Definition at line 160 of file FreeBusyGeneratorTest.php.

160 {
161
162 // transparent, hidden
163 $blob = <<<ICS
164BEGIN:VCALENDAR
165BEGIN:VEVENT
166UID:foobar3
167TRANSP:TRANSPARENT
168DTSTART:20110101T140000Z
169DTEND:20110101T150000Z
170END:VEVENT
171END:VCALENDAR
172ICS;
173
175 "",
176 $blob
177 );
178
179 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testVAvailabilityIrrelevant()

Sabre\VObject\FreeBusyGeneratorTest::testVAvailabilityIrrelevant ( )

This VAVAILABILITY object does not overlap at all with the freebusy report, so it should be ignored.

Definition at line 580 of file FreeBusyGeneratorTest.php.

580 {
581
582 $blob = <<<ICS
583BEGIN:VCALENDAR
584BEGIN:VEVENT
585UID:lalala
586DTSTART:20110101T120000Z
587DTEND:20110101T130000Z
588END:VEVENT
589END:VCALENDAR
590ICS;
591
592 $vavail = <<<ICS
593BEGIN:VCALENDAR
594BEGIN:VAVAILABILITY
595DTSTART:20150101T000000Z
596DTEND:20160101T000000Z
597BEGIN:AVAILABLE
598DTSTART:20150101T000000Z
599DTEND:20150101T010000Z
600END:AVAILABLE
601END:VAVAILABILITY
602END:VCALENDAR
603ICS;
604
606 "FREEBUSY:20110101T120000Z/20110101T130000Z",
607 $blob,
608 null,
609 $vavail
610 );
611
612 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testVAvailabilityOfficeHours()

Sabre\VObject\FreeBusyGeneratorTest::testVAvailabilityOfficeHours ( )

This VAVAILABILITY object has a 9am-5pm AVAILABLE object for office hours.

Definition at line 618 of file FreeBusyGeneratorTest.php.

618 {
619
620 $blob = <<<ICS
621BEGIN:VCALENDAR
622BEGIN:VEVENT
623UID:lalala
624DTSTART:20110101T120000Z
625DTEND:20110101T130000Z
626END:VEVENT
627END:VCALENDAR
628ICS;
629
630 $vavail = <<<ICS
631BEGIN:VCALENDAR
632BEGIN:VAVAILABILITY
633DTSTART:20100101T000000Z
634DTEND:20120101T000000Z
635BUSYTYPE:BUSY-TENTATIVE
636BEGIN:AVAILABLE
637DTSTART:20101213T090000Z
638DTEND:20101213T170000Z
639RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
640END:AVAILABLE
641END:VAVAILABILITY
642END:VCALENDAR
643ICS;
644
646 "FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T110000Z/20110101T120000Z\n" .
647 "FREEBUSY:20110101T120000Z/20110101T130000Z\n" .
648 "FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T130000Z/20110103T090000Z\n",
649 $blob,
650 null,
651 $vavail
652 );
653
654 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testVAvailabilityOfficeHoursVacation()

Sabre\VObject\FreeBusyGeneratorTest::testVAvailabilityOfficeHoursVacation ( )

This test has the same office hours, but has a vacation blocked off for the relevant time, using a higher priority.

(lower number).

Definition at line 660 of file FreeBusyGeneratorTest.php.

660 {
661
662 $blob = <<<ICS
663BEGIN:VCALENDAR
664BEGIN:VEVENT
665UID:lalala
666DTSTART:20110101T120000Z
667DTEND:20110101T130000Z
668END:VEVENT
669END:VCALENDAR
670ICS;
671
672 $vavail = <<<ICS
673BEGIN:VCALENDAR
674BEGIN:VAVAILABILITY
675DTSTART:20100101T000000Z
676DTEND:20120101T000000Z
677BUSYTYPE:BUSY-TENTATIVE
678PRIORITY:2
679BEGIN:AVAILABLE
680DTSTART:20101213T090000Z
681DTEND:20101213T170000Z
682RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
683END:AVAILABLE
684END:VAVAILABILITY
685BEGIN:VAVAILABILITY
686PRIORITY:1
687DTSTART:20101214T000000Z
688DTEND:20110107T000000Z
689BUSYTYPE:BUSY
690END:VAVAILABILITY
691END:VCALENDAR
692ICS;
693
695 "FREEBUSY:20110101T110000Z/20110103T110000Z",
696 $blob,
697 null,
698 $vavail
699 );
700
701 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testVAvailabilityOfficeHoursVacation2()

Sabre\VObject\FreeBusyGeneratorTest::testVAvailabilityOfficeHoursVacation2 ( )

This test has the same input as the last, except somebody mixed up the PRIORITY values.

The end-result is that the vacation VAVAILABILITY is completely ignored.

Definition at line 709 of file FreeBusyGeneratorTest.php.

709 {
710
711 $blob = <<<ICS
712BEGIN:VCALENDAR
713BEGIN:VEVENT
714UID:lalala
715DTSTART:20110101T120000Z
716DTEND:20110101T130000Z
717END:VEVENT
718END:VCALENDAR
719ICS;
720
721 $vavail = <<<ICS
722BEGIN:VCALENDAR
723BEGIN:VAVAILABILITY
724DTSTART:20100101T000000Z
725DTEND:20120101T000000Z
726BUSYTYPE:BUSY-TENTATIVE
727PRIORITY:1
728BEGIN:AVAILABLE
729DTSTART:20101213T090000Z
730DTEND:20101213T170000Z
731RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
732END:AVAILABLE
733END:VAVAILABILITY
734BEGIN:VAVAILABILITY
735PRIORITY:2
736DTSTART:20101214T000000Z
737DTEND:20110107T000000Z
738BUSYTYPE:BUSY
739END:VAVAILABILITY
740END:VCALENDAR
741ICS;
742
744 "FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T110000Z/20110101T120000Z\n" .
745 "FREEBUSY:20110101T120000Z/20110101T130000Z\n" .
746 "FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T130000Z/20110103T090000Z\n",
747 $blob,
748 null,
749 $vavail
750 );
751
752 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testVAvailabilitySimple()

Sabre\VObject\FreeBusyGeneratorTest::testVAvailabilitySimple ( )

This VAVAILABILITY object overlaps with the time-range, but we're just busy the entire time.

Definition at line 540 of file FreeBusyGeneratorTest.php.

540 {
541
542 $blob = <<<ICS
543BEGIN:VCALENDAR
544BEGIN:VEVENT
545UID:lalala
546DTSTART:20110101T120000Z
547DTEND:20110101T130000Z
548END:VEVENT
549END:VCALENDAR
550ICS;
551
552 $vavail = <<<ICS
553BEGIN:VCALENDAR
554BEGIN:VAVAILABILITY
555DTSTART:20110101T000000Z
556DTEND:20120101T000000Z
557BEGIN:AVAILABLE
558DTSTART:20110101T000000Z
559DTEND:20110101T010000Z
560END:AVAILABLE
561END:VAVAILABILITY
562END:VCALENDAR
563ICS;
564
566 "FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T110000Z/20110101T120000Z\n" .
567 "FREEBUSY:20110101T120000Z/20110101T130000Z\n" .
568 "FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T130000Z/20110103T110000Z",
569 $blob,
570 null,
571 $vavail
572 );
573
574 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testVFreeBusy()

Sabre\VObject\FreeBusyGeneratorTest::testVFreeBusy ( )

Testing feeding VFREEBUSY objects instead of VEVENT.

Definition at line 369 of file FreeBusyGeneratorTest.php.

369 {
370
371 // Freebusy. Some parts show up
372 $blob = <<<ICS
373BEGIN:VCALENDAR
374BEGIN:VFREEBUSY
375FREEBUSY:20110103T010000Z/20110103T020000Z
376FREEBUSY;FBTYPE=FREE:20110103T020000Z/20110103T030000Z
377FREEBUSY:20110103T030000Z/20110103T040000Z,20110103T040000Z/20110103T050000Z
378FREEBUSY:20120101T000000Z/20120101T010000Z
379FREEBUSY:20110103T050000Z/PT1H
380END:VFREEBUSY
381END:VCALENDAR
382ICS;
383
385 "FREEBUSY:20110103T010000Z/20110103T020000Z\n" .
386 'FREEBUSY:20110103T030000Z/20110103T060000Z',
387 $blob
388 );
389
390 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testYearlyRecurrence()

Sabre\VObject\FreeBusyGeneratorTest::testYearlyRecurrence ( )

Definition at line 392 of file FreeBusyGeneratorTest.php.

392 {
393
394 // Yearly recurrence rule, shows up
395 $blob = <<<ICS
396BEGIN:VCALENDAR
397BEGIN:VEVENT
398UID:foobar13
399DTSTART:20100101T220000Z
400DTEND:20100101T230000Z
401RRULE:FREQ=YEARLY
402END:VEVENT
403END:VCALENDAR
404ICS;
405
407 'FREEBUSY:20110101T220000Z/20110101T230000Z',
408 $blob
409 );
410
411 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

◆ testYearlyRecurrenceDuration()

Sabre\VObject\FreeBusyGeneratorTest::testYearlyRecurrenceDuration ( )

Definition at line 413 of file FreeBusyGeneratorTest.php.

413 {
414
415 // Yearly recurrence rule + duration, shows up
416 $blob = <<<ICS
417BEGIN:VCALENDAR
418BEGIN:VEVENT
419UID:foobar14
420DTSTART:20100101T230000Z
421DURATION:PT1H
422RRULE:FREQ=YEARLY
423END:VEVENT
424END:VCALENDAR
425ICS;
426
428 'FREEBUSY:20110101T230000Z/20110102T000000Z',
429 $blob
430 );
431
432 }

References Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: