| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function testWindDirection() |
||
| 27 | { |
||
| 28 | $fakeXml = new \SimpleXMLElement(FakeData::CURRENT_WEATHER_XML); |
||
| 29 | $weather = new CurrentWeather($fakeXml, "metric"); |
||
| 30 | $this->assertSame($weather->wind->direction->getValue(), 300.0); |
||
| 31 | |||
| 32 | $fakeXml = new \SimpleXMLElement(FakeData::CURRENT_WEATHER_XML_NO_WIND_DIRECTION); |
||
| 33 | $weather = new CurrentWeather($fakeXml, "metric"); |
||
| 34 | $this->assertNull($weather->wind->direction); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |