METAR parsing infinite loop bugfix #599 (#600)

METAR parsing infinite loop bugfix #599
This commit is contained in:
Nabeel S
2020-02-28 22:50:41 -05:00
committed by GitHub
parent b0f122a301
commit ea9ee985e8
4 changed files with 33 additions and 3 deletions

View File

@@ -185,4 +185,15 @@ class MetarTest extends TestCase
$this->assertNull($airportSvc->getMetar('idk'));
}
public function testHttpCallUnknown()
{
$this->mockXmlResponse('aviationweather/unknown.xml');
/** @var AirportService $airportSvc */
$airportSvc = app(AirportService::class);
$metar = $airportSvc->getMetar('7AK4');
$this->assertNull($metar);
}
}