Add tests and make them pass
This commit is contained in:
@@ -89,6 +89,20 @@ final class GeocodeTraitTest extends TestCase
|
||||
$this->assertFalse($this->obj->isGeocoded());
|
||||
}
|
||||
|
||||
public function testIsGeocodedReturnsTrueIfLongitudeIsZeroAndLatIsNot(): void
|
||||
{
|
||||
$this->obj->setLatitude(0.1);
|
||||
$this->obj->setLongitude(0);
|
||||
$this->assertTrue($this->obj->isGeocoded());
|
||||
}
|
||||
|
||||
public function testIsGeocodedReturnsTrueIfLatitudeIsZeroAndLongIsNot(): void
|
||||
{
|
||||
$this->obj->setLatitude(0);
|
||||
$this->obj->setLongitude(0.2);
|
||||
$this->assertTrue($this->obj->isGeocoded());
|
||||
}
|
||||
|
||||
private function getTraitObject(): GeocodeInterface
|
||||
{
|
||||
return new class implements GeocodeInterface
|
||||
|
||||
Reference in New Issue
Block a user