public function testSub() { $tests = [[Distance::m(1000)->sub(Distance::km(1))->m, 0], [Distance::km(10)->sub(Distance::m(200))->m, 9800]]; foreach ($tests as $test) { $this->assertEquals($test[1], $test[0]); } }
public function testShouldConvertToKilometersWithAlias() { $distance = new Distance(1000); $this->assertSame(1.0, $distance->km()); }