Completed
Pull Request — master (#5574)
by Christopher
11:14
created

TimeTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 11
rs 10
c 1
b 0
f 0
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A testNice() 0 7 1
1
<?php
2
3
use SilverStripe\Model\FieldType\DBField;
4
5
/**
6
 * @package framework
7
 * @subpackage tests
8
 */
9
class TimeTest extends SapphireTest {
10
11
	public function testNice() {
12
		$time = DBField::create_field('Time', '17:15:55');
13
		$this->assertEquals('5:15pm', $time->Nice());
14
15
		Config::inst()->update('SilverStripe\Model\FieldType\DBTime', 'nice_format', 'H:i:s');
16
		$this->assertEquals('17:15:55', $time->Nice());
17
	}
18
19
}
20