SecurityDateTimeTest::test_to_string()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Fhp\DataElementGroups;
4
5
class SecurityDateTimeTest extends \PHPUnit_Framework_TestCase
6
{
7
    public function test_to_string()
8
    {
9
        $dateTime = new \DateTime();
10
        $e = new SecurityDateTime(SecurityDateTime::DATETIME_TYPE_STS, $dateTime);
11
12
        $this->assertEquals('1:' . $dateTime->format('Ymd') . ':' . $dateTime->format('His'), (string) $e);
13
        $this->assertEquals('1:' . $dateTime->format('Ymd') . ':' . $dateTime->format('His'), $e->toString());
14
    }
15
}
16