mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
8dd644d25d
Namespace all templates Move difflib and BBCodeParser2 to thirdparty Remove deprecated API marked for removal in 4.0
26 lines
492 B
PHP
26 lines
492 B
PHP
<?php
|
|
|
|
|
|
use SilverStripe\ORM\FieldType\DBField;
|
|
use SilverStripe\Core\Config\Config;
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
|
|
|
|
|
|
/**
|
|
* @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());
|
|
}
|
|
|
|
}
|