| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function testTimezoneConversion($offsetString, $offsetSeconds) |
||
| 29 | { |
||
| 30 | $class = new \ReflectionClass(City::class); |
||
| 31 | $method = $class->getMethod("timezoneOffsetInSecondsToHours"); |
||
| 32 | $method->setAccessible(true); |
||
| 33 | |||
| 34 | $this->assertSame($offsetString, $method->invoke(null, $offsetSeconds)); |
||
| 35 | $offsetTimezone = new \DateTimeZone($offsetString); |
||
| 36 | $this->assertSame($offsetSeconds, $offsetTimezone->getOffset(new \DateTime("now", new \DateTimeZone("GMT")))); |
||
| 37 | } |
||
| 38 | |||
| 51 |