php-src/ext/intl/tests/calendar_isWeekend_basic.phpt
Gustavo André dos Santos Lopes d32ac3efc8 Fixed tests that required a "default" timezone.
Added date.timezone=Atlantic/Azores to all tests that were failing because
of ext/date warning about a timezone not having been set.
2012-04-01 23:28:01 +01:00

26 lines
700 B
PHP

--TEST--
IntlCalendar::isWeekend basic test
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
die('skip for ICU 4.4+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "nl");
$intlcal = IntlCalendar::createInstance('UTC');
var_dump($intlcal->isWeekend(strtotime('2012-02-29 12:00:00 +0000') * 1000));
var_dump(intlcal_is_weekend($intlcal, strtotime('2012-02-29 12:00:00 +0000') * 1000));
var_dump($intlcal->isWeekend(strtotime('2012-03-11 12:00:00 +0000') * 1000));
?>
==DONE==
--EXPECT--
bool(false)
bool(false)
bool(true)
==DONE==