|
@@ -42,11 +42,11 @@ discard block |
|
|
block discarded – undo |
42
|
42
|
|
43
|
43
|
public function testGeocodeWithRealAddress() |
44
|
44
|
{ |
45
|
|
- if (!isset($_SERVER['OPEN_ROUTE_SERVICE_API_KEY'])) { |
|
45
|
+ if (!isset($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ])) { |
46
|
46
|
$this->markTestSkipped('You need to configure the OPEN_ROUTE_SERVICE_API_KEY value in phpunit.xml'); |
47
|
47
|
} |
48
|
48
|
|
49
|
|
- $provider = new OpenRouteService($this->getHttpClient($_SERVER['OPEN_ROUTE_SERVICE_API_KEY']), $_SERVER['OPEN_ROUTE_SERVICE_API_KEY']); |
|
49
|
+ $provider = new OpenRouteService($this->getHttpClient($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]), $_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]); |
50
|
50
|
$results = $provider->geocodeQuery(GeocodeQuery::create('242 Acklam Road, London, United Kingdom')); |
51
|
51
|
|
52
|
52
|
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results); |
|
@@ -67,11 +67,11 @@ discard block |
|
|
block discarded – undo |
67
|
67
|
|
68
|
68
|
public function testReverseWithRealCoordinates() |
69
|
69
|
{ |
70
|
|
- if (!isset($_SERVER['OPEN_ROUTE_SERVICE_API_KEY'])) { |
|
70
|
+ if (!isset($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ])) { |
71
|
71
|
$this->markTestSkipped('You need to configure the OPEN_ROUTE_SERVICE_API_KEY value in phpunit.xml'); |
72
|
72
|
} |
73
|
73
|
|
74
|
|
- $provider = new OpenRouteService($this->getHttpClient($_SERVER['OPEN_ROUTE_SERVICE_API_KEY']), $_SERVER['OPEN_ROUTE_SERVICE_API_KEY']); |
|
74
|
+ $provider = new OpenRouteService($this->getHttpClient($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]), $_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]); |
75
|
75
|
$results = $provider->reverseQuery(ReverseQuery::fromCoordinates(54.0484068, -2.7990345)); |
76
|
76
|
|
77
|
77
|
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results); |
|
@@ -95,11 +95,11 @@ discard block |
|
|
block discarded – undo |
95
|
95
|
|
96
|
96
|
public function testReverseWithVillage() |
97
|
97
|
{ |
98
|
|
- if (!isset($_SERVER['OPEN_ROUTE_SERVICE_API_KEY'])) { |
|
98
|
+ if (!isset($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ])) { |
99
|
99
|
$this->markTestSkipped('You need to configure the OPEN_ROUTE_SERVICE_API_KEY value in phpunit.xml'); |
100
|
100
|
} |
101
|
101
|
|
102
|
|
- $provider = new OpenRouteService($this->getHttpClient($_SERVER['OPEN_ROUTE_SERVICE_API_KEY']), $_SERVER['OPEN_ROUTE_SERVICE_API_KEY']); |
|
102
|
+ $provider = new OpenRouteService($this->getHttpClient($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]), $_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]); |
103
|
103
|
$results = $provider->reverseQuery(ReverseQuery::fromCoordinates(49.1390924, 1.6572462)); |
104
|
104
|
|
105
|
105
|
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results); |
|
@@ -113,11 +113,11 @@ discard block |
|
|
block discarded – undo |
113
|
113
|
|
114
|
114
|
public function testGeocodeWithCity() |
115
|
115
|
{ |
116
|
|
- if (!isset($_SERVER['OPEN_ROUTE_SERVICE_API_KEY'])) { |
|
116
|
+ if (!isset($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ])) { |
117
|
117
|
$this->markTestSkipped('You need to configure the OPEN_ROUTE_SERVICE_API_KEY value in phpunit.xml'); |
118
|
118
|
} |
119
|
119
|
|
120
|
|
- $provider = new OpenRouteService($this->getHttpClient($_SERVER['OPEN_ROUTE_SERVICE_API_KEY']), $_SERVER['OPEN_ROUTE_SERVICE_API_KEY']); |
|
120
|
+ $provider = new OpenRouteService($this->getHttpClient($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]), $_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]); |
121
|
121
|
$results = $provider->geocodeQuery(GeocodeQuery::create('Hanover')); |
122
|
122
|
|
123
|
123
|
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results); |
|
@@ -166,11 +166,11 @@ discard block |
|
|
block discarded – undo |
166
|
166
|
|
167
|
167
|
public function testGeocodeWithCityDistrict() |
168
|
168
|
{ |
169
|
|
- if (!isset($_SERVER['OPEN_ROUTE_SERVICE_API_KEY'])) { |
|
169
|
+ if (!isset($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ])) { |
170
|
170
|
$this->markTestSkipped('You need to configure the OPEN_ROUTE_SERVICE_API_KEY value in phpunit.xml'); |
171
|
171
|
} |
172
|
172
|
|
173
|
|
- $provider = new OpenRouteService($this->getHttpClient($_SERVER['OPEN_ROUTE_SERVICE_API_KEY']), $_SERVER['OPEN_ROUTE_SERVICE_API_KEY']); |
|
173
|
+ $provider = new OpenRouteService($this->getHttpClient($_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]), $_SERVER[ 'OPEN_ROUTE_SERVICE_API_KEY' ]); |
174
|
174
|
$results = $provider->geocodeQuery(GeocodeQuery::create('Kalbacher Hauptstraße 10, 60437 Frankfurt, Germany')); |
175
|
175
|
|
176
|
176
|
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results); |