getNormalizedValueTest::test()   A
last analyzed

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 Tests\TestCase;
6
7
use function sweetrdf\InMemoryStoreSqlite\getNormalizedValue;
8
9
class getNormalizedValueTest extends TestCase
10
{
11
    /**
12
     * Tests to behavior, if a datetime string was given.
13
     */
14
    public function test()
15
    {
16
        // case with +hourse
17
        $string = '2009-05-28T18:03:38+09:00';
18
        $this->assertEquals('2009-05-28T09:03:38Z', getNormalizedValue($string));
19
20
        // GMT case
21
        $string = '2009-05-28T18:03:38GMT';
22
        $this->assertEquals('2009-05-28T18:03:38Z', getNormalizedValue($string));
23
    }
24
}
25