Passed
Push — master ( 67a964...2aff1a )
by Konrad
04:08
created

getNormalizedValueTest::test()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 9
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Tests\Unit\functions;
4
5
use function sweetrdf\InMemoryStoreSqlite\getNormalizedValue;
6
use Tests\TestCase;
7
8
class getNormalizedValueTest extends TestCase
9
{
10
    /**
11
     * Tests to behavior, if a datetime string was given.
12
     */
13
    public function test()
14
    {
15
        // case with +hourse
16
        $string = '2009-05-28T18:03:38+09:00';
17
        $this->assertEquals('2009-05-28T09:03:38Z', getNormalizedValue($string));
18
19
        // GMT case
20
        $string = '2009-05-28T18:03:38GMT';
21
        $this->assertEquals('2009-05-28T18:03:38Z', getNormalizedValue($string));
22
    }
23
}
24