Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1820541
VTimeZoneTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
941 B
Subscribers
None
VTimeZoneTest.php
View Options
<?php
namespace
Sabre\VObject\Component
;
use
Sabre\VObject
;
use
Sabre\VObject\Reader
;
class
VTimeZoneTest
extends
\PHPUnit_Framework_TestCase
{
function
testValidate
()
{
$input
=
<<<HI
BEGIN:VCALENDAR
VERSION:2.0
PRODID:YoYo
BEGIN:VTIMEZONE
TZID:America/Toronto
END:VTIMEZONE
END:VCALENDAR
HI;
$obj
=
Reader
::
read
(
$input
);
$warnings
=
$obj
->
validate
();
$messages
=
array
();
foreach
(
$warnings
as
$warning
)
{
$messages
[]
=
$warning
[
'message'
];
}
$this
->
assertEquals
(
array
(),
$messages
);
}
function
testGetTimeZone
()
{
$input
=
<<<HI
BEGIN:VCALENDAR
VERSION:2.0
PRODID:YoYo
BEGIN:VTIMEZONE
TZID:America/Toronto
END:VTIMEZONE
END:VCALENDAR
HI;
$obj
=
Reader
::
read
(
$input
);
$tz
=
new
\DateTimeZone
(
'America/Toronto'
);
$this
->
assertEquals
(
$tz
,
$obj
->
VTIMEZONE
->
getTimeZone
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Dec 22, 5:14 AM (5 d, 5 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
916478
Default Alt Text
VTimeZoneTest.php (941 B)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment