Return null instead of throwing

This commit is contained in:
Brabli
2022-10-17 15:46:19 +01:00
parent 31d29f2460
commit 57796a6fdb
2 changed files with 9 additions and 13 deletions

View File

@@ -33,11 +33,10 @@ class GeocodeTest extends KernelTestCase
$this->assertInstanceOf(Geocoder::class, $this->geocoder);
}
public function testGeocodePostcodeThrowsOnInvalidInput(): void
public function testGeocodePostcodeReturnsNullOnInvalidInput(): void
{
sleep(1);
$this->expectException(\Exception::class);
$this->geocoder->geocodePostcode('aaaaaaaa');
$this->assertNull($this->geocoder->geocodePostcode(''));
}
public function testGeocodePostcodeReturnsLatLonModel(): void