com php-src: Make IntlCalendar::getNow() test more tolerant: ext/intl/tests/calendar_getNow_basic.phpt

From: Date: Fri, 22 Jul 2016 15:20:56 +0000
Subject: com php-src: Make IntlCalendar::getNow() test more tolerant: ext/intl/tests/calendar_getNow_basic.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93320@lists.php.net to get a copy of this message
Commit: 4fc1bfa93bca114fc6d31b6f71836064dac157cd Author: Nikita Popov <nikic@php.net> Fri, 22 Jul 2016 17:20:56 +0200 Parents: 6b116932b28b76c3f075921a0f2660f7bf5ac4e1 Branches: PHP-5.6 PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4fc1bfa93bca114fc6d31b6f71836064dac157cd Log: 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. Changed paths: M ext/intl/tests/calendar_getNow_basic.phpt Diff: diff --git a/ext/intl/tests/calendar_getNow_basic.phpt b/ext/intl/tests/calendar_getNow_basic.phpt index 18325df..2df112d 100644 --- a/ext/intl/tests/calendar_getNow_basic.phpt +++ b/ext/intl/tests/calendar_getNow_basic.phpt @@ -13,11 +13,11 @@ $now = IntlCalendar::getNow(); $proc_now = intlcal_get_now(); $time = time(); var_dump(abs($now - $proc_now) < 500); -var_dump(abs($time * 1000 - $proc_now) < 1000); +var_dump(abs($time * 1000 - $proc_now) < 2000); ?> ==DONE== --EXPECT-- bool(true) bool(true) -==DONE== \ No newline at end of file +==DONE==

« previous php.cvs (#93320) next »