Add test
This commit is contained in:
@@ -39,11 +39,22 @@ final class GeocodeTest extends KernelTestCase
|
|||||||
$this->assertNull($this->geocoder->geocodePostcode(''));
|
$this->assertNull($this->geocoder->geocodePostcode(''));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGeocodePostcodeReturnsGeoCoordinates(): void
|
public function testGeocodePostcodeReturnsGeoCoordinates(): GeoCoordinates
|
||||||
{
|
{
|
||||||
sleep(1);
|
sleep(1);
|
||||||
$result = $this->geocoder->geocodePostcode(self::POSTCODE);
|
$geoCoords = $this->geocoder->geocodePostcode(self::POSTCODE);
|
||||||
$this->assertInstanceOf(GeoCoordinates::class, $result);
|
$this->assertNotNull($geoCoords);
|
||||||
|
|
||||||
|
return $geoCoords;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testGeocodePostcodeReturnsGeoCoordinates
|
||||||
|
*/
|
||||||
|
public function testCoordinatesAreSet(GeoCoordinates $geoCoordinates): void
|
||||||
|
{
|
||||||
|
$this->assertIsFloat($geoCoordinates->latitude);
|
||||||
|
$this->assertIsFloat($geoCoordinates->longitude);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getMappableEntity(): MappableInterface
|
private function getMappableEntity(): MappableInterface
|
||||||
|
|||||||
Reference in New Issue
Block a user