Fix errors in the METAR parsing for clouds; display error for pressure units

This commit is contained in:
Nabeel Shahzad
2019-07-17 08:57:45 -04:00
parent 15e6226511
commit ec81a6d157
3 changed files with 19 additions and 7 deletions

View File

@@ -138,4 +138,13 @@ class MetarTest extends TestCase
$this->assertEquals('VFR', $metar['category']);
$this->assertNotNull($metar);
}
public function testMetar4Clouds()
{
$metar = 'KAUS 171153Z 18006KT 9SM FEW015 FEW250 26/24 A3003 RMK AO2 SLP156 T02560244 10267 20239 $';
$metar = Metar::parse($metar);
$this->assertNotNull($metar);
$this->assertEquals(2, count($metar->clouds));
}
}