Skip to content

Commit 5e268dc

Browse files
authored
Allow some providers not return street address (#6)
1 parent e99a90b commit 5e268dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ProviderIntegrationTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ public function testGeocodeQuery()
9494
$this->assertEquals(51.5033, $location->getCoordinates()->getLatitude(), 'Latitude should be in London', 0.1);
9595
$this->assertEquals(-0.1276, $location->getCoordinates()->getLongitude(), 'Longitude should be in London', 0.1);
9696
$this->assertContains('Downing', $location->getStreetName(), 'Street name should contain "Downing St"');
97-
$this->assertContains('10', $location->getStreetNumber(), 'Street number should contain "10"');
97+
98+
if (null !== $streetNumber = $location->getStreetNumber()) {
99+
$this->assertContains('10', $streetNumber, 'Street number should contain "10"');
100+
}
98101
}
99102

100103
public function testGeocodeQueryWithNoResults()

0 commit comments

Comments
 (0)