Add tests for 0 results METAR

This commit is contained in:
Nabeel Shahzad
2021-04-14 06:45:35 -04:00
parent f5e83461a3
commit d18925f473
2 changed files with 20 additions and 0 deletions

View File

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