Fix rounding in the field tests

This commit is contained in:
Nabeel Shahzad
2018-01-04 20:19:49 -06:00
parent 9ad6434b38
commit 6db436b908

View File

@@ -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]);
}
}