php-src/ext/intl/tests/calendar_createInstance_basic.phpt
Gina Peter Banyard c42e6d62d8
ext/intl: modernize tests (#19392)
This is effectively removing ZPP tests, enabling warnings, and moving INI settings into the INI PHPT block
2025-08-06 23:33:48 +01:00

34 lines
577 B
PHP

--TEST--
IntlCalendar::createInstance() basic test
--EXTENSIONS--
intl
--INI--
intl.default_locale=nl
date.timezone=Europe/Amsterdam
--FILE--
<?php
$cal = IntlCalendar::createInstance();
print_R($cal->getTimeZone());
print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
echo "\n";
print_R($cal->getType());
echo "\n";
$timeMillis = $cal->getTime();
$time = time();
var_dump(abs($timeMillis - $time * 1000) < 2000);
?>
--EXPECTF--
IntlTimeZone Object
(
[valid] => 1
[id] => Europe/Amsterdam
[rawOffset] => 3600000
[currentOffset] => %d
)
nl
gregorian
bool(true)