More robust datetime ICU tests

Some ICU versions (e.g. on CentOS 7.2 with PHP 5.6)
use lowercase rather than uppercase AM/PM indicators
This commit is contained in:
Ingo Schommer 2017-05-08 21:34:56 +12:00
parent 20c6066391
commit 493556e497

View File

@ -86,7 +86,8 @@ class DBDatetimeTest extends SapphireTest
public function testTime()
{
$date = DBDatetime::create_field('Datetime', '2001-12-31 22:10:59');
$this->assertEquals('10:10:59 PM', $date->Time());
// casing depends on system ICU library
$this->assertRegexp('#10:10:59 (PM|pm)#', $date->Time());
}
public function testTime24()