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

Public Member Functions

 testValidate ()
 
 testGetTimeZone ()
 

Detailed Description

Definition at line 8 of file VTimeZoneTest.php.

Member Function Documentation

◆ testGetTimeZone()

Sabre\VObject\Component\VTimeZoneTest::testGetTimeZone ( )

Definition at line 34 of file VTimeZoneTest.php.

34 {
35
36 $input = <<<HI
37BEGIN:VCALENDAR
38VERSION:2.0
39PRODID:YoYo
40BEGIN:VTIMEZONE
41TZID:America/Toronto
42END:VTIMEZONE
43END:VCALENDAR
44HI;
45
46 $obj = Reader::read($input);
47
48 $tz = new \DateTimeZone('America/Toronto');
49
50 $this->assertEquals(
51 $tz,
52 $obj->VTIMEZONE->getTimeZone()
53 );
54
55 }
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, $tz, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testValidate()

Sabre\VObject\Component\VTimeZoneTest::testValidate ( )

Definition at line 10 of file VTimeZoneTest.php.

10 {
11
12 $input = <<<HI
13BEGIN:VCALENDAR
14VERSION:2.0
15PRODID:YoYo
16BEGIN:VTIMEZONE
17TZID:America/Toronto
18END:VTIMEZONE
19END:VCALENDAR
20HI;
21
22 $obj = Reader::read($input);
23
24 $warnings = $obj->validate();
25 $messages = [];
26 foreach ($warnings as $warning) {
27 $messages[] = $warning['message'];
28 }
29
30 $this->assertEquals([], $messages);
31
32 }
$warning
Definition: X509warning.php:13
$messages
Definition: en.php:5

References Sabre\VObject\$input, $messages, $warning, $warnings, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

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