Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function testGetNowDateTime($microtime, $expectedDateTime) |
||
18 | { |
||
19 | |||
20 | $clockReflection = new \ReflectionClass(ClockMock::class); |
||
21 | |||
22 | $reflectionProperty = $clockReflection->getProperty('now'); |
||
23 | $reflectionProperty->setAccessible(true); |
||
24 | $reflectionProperty->setValue($microtime); |
||
25 | |||
26 | ClockMock::register(DateTimeCreator::class); |
||
27 | |||
28 | $datetime = DateTimeCreator::getNowDateTime(); |
||
29 | |||
30 | $this->assertEquals($expectedDateTime, $datetime); |
||
31 | } |
||
32 | |||
51 |