silverstripe-framework/tests/model/TimeTest.php
2016-06-29 10:02:32 +12:00

22 lines
418 B
PHP

<?php
use SilverStripe\ORM\FieldType\DBField;
/**
* @package framework
* @subpackage tests
*/
class TimeTest extends SapphireTest {
public function testNice() {
$time = DBField::create_field('Time', '17:15:55');
$this->assertEquals('5:15pm', $time->Nice());
Config::inst()->update('SilverStripe\\ORM\\FieldType\\DBTime', 'nice_format', 'H:i:s');
$this->assertEquals('17:15:55', $time->Nice());
}
}