mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-25 04:23:38 +01:00
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/13122] Make phpbb_wrapper_gmgetdate_test more reliable
This commit is contained in:
commit
7c8b8877df
@ -50,7 +50,18 @@ class phpbb_wrapper_gmgetdate_test extends phpbb_test_case
|
||||
$date_array['year']
|
||||
);
|
||||
|
||||
$this->assertEquals($expected, $actual);
|
||||
// Calling second-granularity time functions twice isn't guaranteed to
|
||||
// give the same results. As long as they're in the right order, allow
|
||||
// a 1 second difference.
|
||||
$this->assertGreaterThanOrEqual(
|
||||
$expected, $actual,
|
||||
'Expected second time to be after (or equal to) the previous one'
|
||||
);
|
||||
$this->assertLessThanOrEqual(
|
||||
1,
|
||||
abs($actual - $expected),
|
||||
"Expected $actual to be within 1 second of $expected."
|
||||
);
|
||||
|
||||
if (isset($current_timezone))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user