From 6db436b9086aa1c041299ab2239168ee20ba9756 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Thu, 4 Jan 2018 20:19:49 -0600 Subject: [PATCH] Fix rounding in the field tests --- tests/AcarsTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/AcarsTest.php b/tests/AcarsTest.php index 79b094eb..2e27b16a 100644 --- a/tests/AcarsTest.php +++ b/tests/AcarsTest.php @@ -36,6 +36,11 @@ class AcarsTest extends TestCase foreach($route as $idx => $point) { //$this->assertHasKeys($points[$idx], $fields); foreach($fields as $f) { + if($f === 'lat' || $f === 'lon') { + $point[$f] = round($point[$f], 2); + $points[$idx][$f] = round($points[$idx][$f], 2); + } + $this->assertEquals($point[$f], $points[$idx][$f]); } }