1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 22:41:20 +02:00
Files
archived-php-src/ext/intl/tests/calendar_getNow_basic.phpt
Nikita Popov 4fc1bfa93b Make IntlCalendar::getNow() test more tolerant
Due to the *1000 factor the two values may be off-by-1000 even
without any actual delay, so increase the check to 2000.
2016-07-22 17:20:56 +02:00

24 lines
447 B
PHP

--TEST--
IntlCalendar::getNow() basic test
--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");
$now = IntlCalendar::getNow();
$proc_now = intlcal_get_now();
$time = time();
var_dump(abs($now - $proc_now) < 500);
var_dump(abs($time * 1000 - $proc_now) < 2000);
?>
==DONE==
--EXPECT--
bool(true)
bool(true)
==DONE==