php-src/ext/intl/tests/calendar_roll_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

34 lines
833 B
PHP

--TEST--
IntlCalendar::roll() basic test
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "nl");
$intlcal = new IntlGregorianCalendar(2012, 1, 28);
var_dump($intlcal->roll(IntlCalendar::FIELD_DAY_OF_MONTH, 2));
var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //1
$intlcal = new IntlGregorianCalendar(2012, 1, 28);
var_dump(intlcal_roll($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH, 2));
var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //1
?>
==DONE==
--EXPECT--
bool(true)
int(1)
int(1)
bool(true)
int(1)
int(1)
==DONE==