Cleanup SI Unit classes and interface for REST responses; fixes to a few METAR parsing issues
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Support\Math;
|
||||
use App\Support\Units\Distance;
|
||||
|
||||
class MathTest extends TestCase
|
||||
{
|
||||
@@ -26,4 +27,11 @@ class MathTest extends TestCase
|
||||
$this->assertEquals($test['expected'], $test['fn']);
|
||||
}
|
||||
}
|
||||
|
||||
public function testDistanceMeasurement()
|
||||
{
|
||||
$dist = new Distance(1, 'mi');
|
||||
$this->assertEquals(1609.34, $dist['m']);
|
||||
$this->assertEquals(1.61, $dist['km']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user