From 525e8ba8bb06f4a3ac7c9fc2a5a3cdcef1e8de85 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 29 Aug 2018 07:58:57 +0800 Subject: [PATCH] Adding cloud height assertion --- tests/MetarTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/MetarTest.php b/tests/MetarTest.php index a947a7cb..df259a35 100644 --- a/tests/MetarTest.php +++ b/tests/MetarTest.php @@ -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()