Metar: TEMPO and trend causing issue with values being overwritten (#862)

Metar: TEMPO and trend causing issue with values being overwritten
This commit is contained in:
Nabeel S
2020-10-10 14:55:12 -04:00
committed by GitHub
parent c702b01a87
commit 48087fb05f
5 changed files with 57 additions and 6 deletions

View File

@@ -173,6 +173,22 @@ class MetarTest extends TestCase
$this->assertInstanceOf(Metar::class, $airportSvc->getMetar('kjfk'));
}
/**
* TEMPO and trend causing issue with values being overwritten
* https://github.com/nabeelio/phpvms/issues/861
*/
public function testLFRSCall()
{
$this->mockXmlResponse('aviationweather/lfrs.xml');
/** @var AirportService $airportSvc */
$airportSvc = app(AirportService::class);
$metar = $airportSvc->getMetar('lfrs');
$this->assertInstanceOf(Metar::class, $metar);
$this->assertTrue($metar['cavok']);
}
public function testHttpCallSuccessFullResponse()
{
$this->mockXmlResponse('aviationweather/kphx.xml');