Skip to content

Commit 1078414

Browse files
committed
Revert ProviderIntegrationTest
1 parent a7a7fb1 commit 1078414

5 files changed

+9
-6
lines changed

.cached_responses/nominatim.openstreetmap.org_0b7c89ad04ee5a2d884a2fb4b718a1d54ff09d87

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
s:1278:"[{"place_id":298181518,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"relation","osm_id":1879842,"boundingbox":["51.5033124","51.5037076","-0.1278335","-0.1272891"],"lat":"51.5034927","lon":"-0.12770540128798905","display_name":"10 Downing Street, 10, Downing Street, Westminster, Covent Garden, London, Greater London, England, SW1A 2AA, United Kingdom","place_rank":30,"category":"tourism","type":"attraction","importance":0.9187064122051384,"icon":"https://nominatim.openstreetmap.org/ui/mapicons/poi_point_of_interest.p.20.png","address":{"tourism":"10 Downing Street","house_number":"10","road":"Downing Street","quarter":"Westminster","suburb":"Covent Garden","city":"London","state_district":"Greater London","state":"England","ISO3166-2-lvl4":"GB-ENG","postcode":"SW1A 2AA","country":"United Kingdom","country_code":"gb"},"extratags":{"office":"government","website":"https://www.gov.uk/government/organisations/prime-ministers-office-10-downing-street","building":"yes","heritage":"2","wikidata":"Q169101","wikipedia":"en:10 Downing Street","ref:GB:nhle":"1210759","listed_status":"Grade I","heritage:website":"https://historicengland.org.uk/listing/the-list/list-entry/1210759","heritage:operator":"Historic England"}}]";

.cached_responses/nominatim.openstreetmap.org_f8507c7e172266250167178dc127b0317c18c390 renamed to .cached_responses/nominatim.openstreetmap.org_dfdc355642ef34fb9970df028c4ec338ce0ea3f4

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
s:736:"{"place_id":3029686,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"node","osm_id":367142942,"lat":"38.9003895","lon":"-77.0374769","place_rank":30,"category":"building","type":"public","importance":0,"addresstype":"building","name":"United States Chamber of Commerce Building","display_name":"United States Chamber of Commerce Building, H Street Northwest, Washington, Washington, D.C., 20006, United States","address":{"building":"United States Chamber of Commerce Building","road":"H Street Northwest","city":"Washington","state":"Washington, D.C.","postcode":"20006","country":"United States","country_code":"us"},"boundingbox":["38.9003395","38.9004395","-77.0375269","-77.0374269"]}";
1+
s:740:"{"place_id":58975603,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"node","osm_id":5355165911,"lat":"38.8996384","lon":"-77.0367192","place_rank":30,"category":"amenity","type":"bench","importance":9.99999999995449e-6,"addresstype":"amenity","name":"Baruch Bench of Inspiration","display_name":"Baruch Bench of Inspiration, H Street Northwest, Washington, District of Columbia, 20006, United States","address":{"amenity":"Baruch Bench of Inspiration","road":"H Street Northwest","city":"Washington","state":"District of Columbia","ISO3166-2-lvl4":"US-DC","postcode":"20006","country":"United States","country_code":"us"},"boundingbox":["38.8995884","38.8996884","-77.0367692","-77.0366692"]}";

src/ProviderIntegrationTest.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,13 @@ public function testGeocodeQuery(): void
118118
$this->assertNotNull($coordinates, 'Coordinates should not be null');
119119
$this->assertEqualsWithDelta(51.5033, $coordinates->getLatitude(), 0.1, 'Latitude should be in London');
120120
$this->assertEqualsWithDelta(-0.1276, $coordinates->getLongitude(), 0.1, 'Longitude should be in London');
121-
$this->assertNotNull($location->getStreetName(), 'Street name should not be null');
122-
$this->assertStringContainsString('Downing', $location->getStreetName(), 'Street name should contain "Downing St"');
123-
$this->assertNotNull($location->getStreetNumber(), 'Street number should not be null');
124-
$this->assertStringContainsString('10', (string) $location->getStreetNumber(), 'Street number should contain "10"');
121+
122+
if (null !== ($streetName = $location->getStreetName())) {
123+
$this->assertStringContainsString('Downing', $streetName, 'Street name should contain "Downing St"');
124+
}
125+
if (null !== ($streetNumber = $location->getStreetNumber())) {
126+
$this->assertStringContainsString('10', (string) $streetNumber, 'Street number should contain "10"');
127+
}
125128
}
126129

127130
public function testGeocodeQueryWithNoResults(): void

0 commit comments

Comments
 (0)