Merge pull request #4307 from gregsmirnov/pulls/3.1/test-timefield-value-at-12am-issue-1713

Test TimeField value at 12:00 am
This commit is contained in:
Daniel Hensby 2015-06-18 22:06:16 +01:00
commit 20ebd88fb8

View File

@ -91,6 +91,14 @@ class TimeFieldTest extends SapphireTest {
$f = new TimeField('Time', 'Time'); $f = new TimeField('Time', 'Time');
$f->setValue('23:59:38'); $f->setValue('23:59:38');
$this->assertEquals($f->dataValue(), '23:59:38'); $this->assertEquals($f->dataValue(), '23:59:38');
$f = new TimeField('Time', 'Time');
$f->setValue('12:00 am');
$this->assertEquals($f->dataValue(), '00:00:00');
$f = new TimeField('Time', 'Time');
$f->setValue('12:00:01 am');
$this->assertEquals($f->dataValue(), '00:00:01');
} }
public function testOverrideWithNull() { public function testOverrideWithNull() {