Adding cloud height assertion

This commit is contained in:
Kevin
2018-08-29 07:58:57 +08:00
parent 75ef658d8f
commit 525e8ba8bb

View File

@@ -84,6 +84,12 @@ class MetarTest extends TestCase
.'BKN016/// OVC040/// //////TCU 13/12 Q1008 TEMPO 4000 RA';
$parsed = Metar::parse($metar);
$this->assertCount(4, $parsed['clouds']);
$this->assertEquals(1000, $parsed['clouds'][0]['height']['ft']);
$this->assertEquals(1600, $parsed['clouds'][1]['height']['ft']);
$this->assertEquals(4000, $parsed['clouds'][2]['height']['ft']);
$this->assertNull($parsed['clouds'][3]['height']['ft']);
}
public function testMetarTrends()