Revert "upgrade icalparser from e6a3a285cf6e239236a40153a66b67b940220b43 to cae1631b9496a7415ef960b0dff1cd0f39fe3135"
This reverts commit e2541c84e4
.
This commit is contained in:
parent
b9da2622a4
commit
d48cf5c579
31 changed files with 876 additions and 1328 deletions
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Marc Vachette <marc.vachette@gmail.com>
|
||||
*/
|
||||
|
||||
use om\IcalParser;
|
||||
use Tester\Assert;
|
||||
use function tests\test;
|
||||
|
||||
require_once __DIR__ . '/bootstrap.php';
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
|
||||
test('Normal time zone', function () {
|
||||
$cal = new IcalParser();
|
||||
$cal->parseFile(__DIR__ . '/cal/blank_description.ics');
|
||||
Assert::same('America/Los_Angeles', $cal->timezone->getName());
|
||||
});
|
||||
|
||||
test('Negative zero UTC timezone', function () {
|
||||
$cal = new IcalParser();
|
||||
$cal->parseFile(__DIR__ . '/cal/utc_negative_zero.ics');
|
||||
Assert::same('Etc/GMT', $cal->timezone->getName());
|
||||
});
|
||||
|
||||
/**
|
||||
* Time zone with custom prefixes (Mozilla files tken from here: https://www.mozilla.org/en-US/projects/calendar/holidays/)
|
||||
*/
|
||||
test('Time zone with custom prefixes', function () {
|
||||
$cal = new IcalParser();
|
||||
$cal->parseFile(__DIR__ . '/cal/FrenchHolidays.ics');
|
||||
Assert::same('Europe/Paris', $cal->timezone->getName());
|
||||
});
|
||||
|
||||
test('Weird windows timezones', function () {
|
||||
$cal = new IcalParser();
|
||||
$cal->parseFile(__DIR__ . '/cal/weird_windows_timezones.ics');
|
||||
$cal->getEvents()->sorted();
|
||||
Assert::same('Atlantic/Reykjavik', $cal->timezone->getName());
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue