This commit is contained in:
brabli
2024-08-05 12:28:25 +01:00
parent df96a8c1ed
commit e4222229c4

View File

@@ -39,11 +39,22 @@ final class GeocodeTest extends KernelTestCase
$this->assertNull($this->geocoder->geocodePostcode(''));
}
public function testGeocodePostcodeReturnsGeoCoordinates(): void
public function testGeocodePostcodeReturnsGeoCoordinates(): GeoCoordinates
{
sleep(1);
$result = $this->geocoder->geocodePostcode(self::POSTCODE);
$this->assertInstanceOf(GeoCoordinates::class, $result);
$geoCoords = $this->geocoder->geocodePostcode(self::POSTCODE);
$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