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.

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

16  {
17 
18  $vcal = <<<VCAL
19 BEGIN:VCALENDAR
20 BEGIN:AVAILABLE
21 END:AVAILABLE
22 END:VCALENDAR
23 VCAL;
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
+ Here is the call graph for this function:

◆ testGetEffectiveStartEnd()

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

Definition at line 29 of file AvailableTest.php.

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

29  {
30 
31  $vcal = <<<VCAL
32 BEGIN:VCALENDAR
33 BEGIN:AVAILABLE
34 DTSTART:20150717T162200Z
35 DTEND:20150717T172200Z
36 END:AVAILABLE
37 END:VCALENDAR
38 VCAL;
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  }
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
+ Here is the call graph for this function:

◆ testGetEffectiveStartEndDuration()

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

Definition at line 52 of file AvailableTest.php.

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

52  {
53 
54  $vcal = <<<VCAL
55 BEGIN:VCALENDAR
56 BEGIN:AVAILABLE
57 DTSTART:20150717T162200Z
58 DURATION:PT1H
59 END:AVAILABLE
60 END:VCALENDAR
61 VCAL;
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  }
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
+ Here is the call graph for this function:

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