Add test for METAR string
This commit is contained in:
@@ -151,6 +151,19 @@ class MetarTest extends TestCase
|
|||||||
$this->assertEquals('Few at 1500 feet; few at 25000 feet', $metar['clouds_report_ft']);
|
$this->assertEquals('Few at 1500 feet; few at 25000 feet', $metar['clouds_report_ft']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://github.com/nabeelio/phpvms/issues/1071
|
||||||
|
*/
|
||||||
|
public function testMetarWindSpeedChill()
|
||||||
|
{
|
||||||
|
$metar = 'EKYT 091020Z /////KT CAVOK 02/M03 Q1019';
|
||||||
|
$metar = Metar::parse($metar);
|
||||||
|
|
||||||
|
$this->assertEquals('VFR', $metar['category']);
|
||||||
|
$this->assertNull($metar['wind_speed']);
|
||||||
|
$this->assertEquals(6.21, $metar['visibility']['mi']);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Visibility in KM not parsed
|
* Visibility in KM not parsed
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user