diff --git a/tests/Service/GeocodeTest.php b/tests/Service/GeocodeTest.php index 8976c4d..beb3241 100644 --- a/tests/Service/GeocodeTest.php +++ b/tests/Service/GeocodeTest.php @@ -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