ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
VTimeZoneTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\VObject\Component
;
4
5
use
PHPUnit\Framework\TestCase
;
6
use
Sabre\VObject\Reader
;
7
8
class
VTimeZoneTest
extends
TestCase {
9
10
function
testValidate
() {
11
12
$input
= <<<HI
13
BEGIN:VCALENDAR
14
VERSION:2.0
15
PRODID:YoYo
16
BEGIN:VTIMEZONE
17
TZID:America/Toronto
18
END:VTIMEZONE
19
END:VCALENDAR
20
HI;
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
}
33
34
function
testGetTimeZone
() {
35
36
$input
= <<<HI
37
BEGIN:VCALENDAR
38
VERSION:2.0
39
PRODID:YoYo
40
BEGIN:VTIMEZONE
41
TZID:America/Toronto
42
END:VTIMEZONE
43
END:VCALENDAR
44
HI;
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
}
56
57
}
Sabre\VObject\Component\VTimeZoneTest\testGetTimeZone
testGetTimeZone()
Definition:
VTimeZoneTest.php:34
$tz
$tz
Definition:
inc.setup_header.php:91
Sabre\VObject\$input
if($argc< 3) $input
Definition:
mergeduplicates.php:35
$warnings
$warnings
Definition:
frontpage_config.php:15
Sabre\VObject\Component
Definition:
Available.php:3
$messages
$messages
Definition:
en.php:5
Sabre\VObject\Component\VTimeZoneTest\testValidate
testValidate()
Definition:
VTimeZoneTest.php:10
$warning
$warning
Definition:
X509warning.php:13
Reader
Sabre\VObject\Reader\read
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition:
Reader.php:42
php
TestCase
Sabre\VObject\Component\VTimeZoneTest
Definition:
VTimeZoneTest.php:8
libs
composer
vendor
sabre
vobject
tests
VObject
Component
VTimeZoneTest.php
Generated on Thu Jan 30 2025 19:01:30 for ILIAS by
1.8.13 (using
Doxyfile
)