2727 */
2828class MapQuestTest extends BaseTestCase
2929{
30- protected function getCacheDir ()
30+ protected function getCacheDir (): string
3131 {
3232 return __DIR__ .'/.cached_responses ' ;
3333 }
3434
35- public function testGetName ()
35+ public function testGetName (): void
3636 {
3737 $ provider = new MapQuest ($ this ->getMockedHttpClient (), 'api_key ' );
3838 $ this ->assertEquals ('map_quest ' , $ provider ->getName ());
3939 }
4040
41- public function testGeocode ()
41+ public function testGeocode (): void
4242 {
4343 $ provider = new MapQuest ($ this ->getMockedHttpClient ('{} ' ), 'api_key ' );
4444 $ result = $ provider ->geocodeQuery (GeocodeQuery::create ('foobar ' ));
@@ -47,7 +47,7 @@ public function testGeocode()
4747 $ this ->assertEquals (0 , $ result ->count ());
4848 }
4949
50- public function testGetNotRelevantData ()
50+ public function testGetNotRelevantData (): void
5151 {
5252 $ json = '{"results":[{"locations":[{"street":"","postalCode":"","adminArea5":"","adminArea4":"","adminArea3":"","adminArea1":""}]}]} ' ;
5353
@@ -58,7 +58,7 @@ public function testGetNotRelevantData()
5858 $ this ->assertEquals (0 , $ result ->count ());
5959 }
6060
61- public function testGeocodeWithRealAddress ()
61+ public function testGeocodeWithRealAddress (): void
6262 {
6363 if (!isset ($ _SERVER ['MAPQUEST_API_KEY ' ])) {
6464 $ this ->markTestSkipped ('You need to configure the MAPQUEST_API_KEY value in phpunit.xml ' );
@@ -108,7 +108,7 @@ public function testGeocodeWithRealAddress()
108108 $ this ->assertNull ($ result ->getTimezone ());
109109 }
110110
111- public function testGeocodeWithRealSpecificAddress ()
111+ public function testGeocodeWithRealSpecificAddress (): void
112112 {
113113 if (!isset ($ _SERVER ['MAPQUEST_API_KEY ' ])) {
114114 $ this ->markTestSkipped ('You need to configure the MAPQUEST_API_KEY value in phpunit.xml ' );
@@ -157,7 +157,7 @@ public function testGeocodeWithRealSpecificAddress()
157157 $ this ->assertNull ($ result ->getTimezone ());
158158 }
159159
160- public function testReverseWithRealCoordinates ()
160+ public function testReverseWithRealCoordinates (): void
161161 {
162162 if (!isset ($ _SERVER ['MAPQUEST_API_KEY ' ])) {
163163 $ this ->markTestSkipped ('You need to configure the MAPQUEST_API_KEY value in phpunit.xml ' );
@@ -188,7 +188,7 @@ public function testReverseWithRealCoordinates()
188188 $ this ->assertNull ($ result ->getTimezone ());
189189 }
190190
191- public function testGeocodeWithCity ()
191+ public function testGeocodeWithCity (): void
192192 {
193193 if (!isset ($ _SERVER ['MAPQUEST_API_KEY ' ])) {
194194 $ this ->markTestSkipped ('You need to configure the MAPQUEST_API_KEY value in phpunit.xml ' );
@@ -262,7 +262,7 @@ public function testGeocodeWithCity()
262262 $ this ->assertEquals ('US ' , $ result ->getCountry ()->getCode ());
263263 }
264264
265- public function testGeocodeWithSpecificCity ()
265+ public function testGeocodeWithSpecificCity (): void
266266 {
267267 if (!isset ($ _SERVER ['MAPQUEST_API_KEY ' ])) {
268268 $ this ->markTestSkipped ('You need to configure the MAPQUEST_API_KEY value in phpunit.xml ' );
@@ -344,7 +344,7 @@ public function testGeocodeWithSpecificCity()
344344 $ this ->assertEquals ('US ' , $ result ->getCountry ()->getCode ());
345345 }
346346
347- public function testGeocodeWithSpecificCityAndBounds ()
347+ public function testGeocodeWithSpecificCityAndBounds (): void
348348 {
349349 if (!isset ($ _SERVER ['MAPQUEST_API_KEY ' ])) {
350350 $ this ->markTestSkipped ('You need to configure the MAPQUEST_API_KEY value in phpunit.xml ' );
@@ -429,7 +429,7 @@ public function testGeocodeWithSpecificCityAndBounds()
429429 $ this ->assertEquals ('DE ' , $ result ->getCountry ()->getCode ());
430430 }
431431
432- public function testGeocodeWithCityDistrict ()
432+ public function testGeocodeWithCityDistrict (): void
433433 {
434434 if (!isset ($ _SERVER ['MAPQUEST_API_KEY ' ])) {
435435 $ this ->markTestSkipped ('You need to configure the MAPQUEST_API_KEY value in phpunit.xml ' );
@@ -461,7 +461,7 @@ public function testGeocodeWithCityDistrict()
461461 $ this ->assertNull ($ result ->getTimezone ());
462462 }
463463
464- public function testGeocodeWithLocalhostIPv4 ()
464+ public function testGeocodeWithLocalhostIPv4 (): void
465465 {
466466 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
467467 $ this ->expectExceptionMessage ('The MapQuest provider does not support IP addresses, only street addresses. ' );
@@ -470,7 +470,7 @@ public function testGeocodeWithLocalhostIPv4()
470470 $ provider ->geocodeQuery (GeocodeQuery::create ('127.0.0.1 ' ));
471471 }
472472
473- public function testGeocodeWithLocalhostIPv6 ()
473+ public function testGeocodeWithLocalhostIPv6 (): void
474474 {
475475 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
476476 $ this ->expectExceptionMessage ('The MapQuest provider does not support IP addresses, only street addresses. ' );
@@ -479,7 +479,7 @@ public function testGeocodeWithLocalhostIPv6()
479479 $ provider ->geocodeQuery (GeocodeQuery::create ('::1 ' ));
480480 }
481481
482- public function testGeocodeWithRealIPv4 ()
482+ public function testGeocodeWithRealIPv4 (): void
483483 {
484484 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
485485 $ this ->expectExceptionMessage ('The MapQuest provider does not support IP addresses, only street addresses. ' );
@@ -488,7 +488,7 @@ public function testGeocodeWithRealIPv4()
488488 $ provider ->geocodeQuery (GeocodeQuery::create ('74.200.247.59 ' ));
489489 }
490490
491- public function testGeocodeWithRealIPv6 ()
491+ public function testGeocodeWithRealIPv6 (): void
492492 {
493493 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
494494 $ this ->expectExceptionMessage ('The MapQuest provider does not support IP addresses, only street addresses. ' );
0 commit comments