ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\Component\AvailableTest Class Reference

We use RFCxxx has a placeholder for the https://tools.ietf.org/html/draft-daboo-calendar-availability-05 name. More...

+ Inheritance diagram for Sabre\VObject\Component\AvailableTest:
+ Collaboration diagram for Sabre\VObject\Component\AvailableTest:

Public Member Functions

 testAvailableComponent ()
 
 testGetEffectiveStartEnd ()
 
 testGetEffectiveStartEndDuration ()
 

Detailed Description

We use RFCxxx has a placeholder for the https://tools.ietf.org/html/draft-daboo-calendar-availability-05 name.

Definition at line 14 of file AvailableTest.php.

Member Function Documentation

◆ testAvailableComponent()

Sabre\VObject\Component\AvailableTest::testAvailableComponent ( )

Definition at line 16 of file AvailableTest.php.

16 {
17
18 $vcal = <<<VCAL
19BEGIN:VCALENDAR
20BEGIN:AVAILABLE
21END:AVAILABLE
22END:VCALENDAR
23VCAL;
24 $document = Reader::read($vcal);
25 $this->assertInstanceOf(__NAMESPACE__ . '\Available', $document->AVAILABLE);
26
27 }
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42

References $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testGetEffectiveStartEnd()

Sabre\VObject\Component\AvailableTest::testGetEffectiveStartEnd ( )

Definition at line 29 of file AvailableTest.php.

29 {
30
31 $vcal = <<<VCAL
32BEGIN:VCALENDAR
33BEGIN:AVAILABLE
34DTSTART:20150717T162200Z
35DTEND:20150717T172200Z
36END:AVAILABLE
37END:VCALENDAR
38VCAL;
39
40 $document = Reader::read($vcal);
41 $tz = new DateTimeZone('UTC');
42 $this->assertEquals(
43 [
44 new DateTimeImmutable('2015-07-17 16:22:00', $tz),
45 new DateTimeImmutable('2015-07-17 17:22:00', $tz),
46 ],
47 $document->AVAILABLE->getEffectiveStartEnd()
48 );
49
50 }

References $tz, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testGetEffectiveStartEndDuration()

Sabre\VObject\Component\AvailableTest::testGetEffectiveStartEndDuration ( )

Definition at line 52 of file AvailableTest.php.

52 {
53
54 $vcal = <<<VCAL
55BEGIN:VCALENDAR
56BEGIN:AVAILABLE
57DTSTART:20150717T162200Z
58DURATION:PT1H
59END:AVAILABLE
60END:VCALENDAR
61VCAL;
62
63 $document = Reader::read($vcal);
64 $tz = new DateTimeZone('UTC');
65 $this->assertEquals(
66 [
67 new DateTimeImmutable('2015-07-17 16:22:00', $tz),
68 new DateTimeImmutable('2015-07-17 17:22:00', $tz),
69 ],
70 $document->AVAILABLE->getEffectiveStartEnd()
71 );
72
73 }

References $tz, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

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