2121
2222class TomTomTest extends BaseTestCase
2323{
24- protected function getCacheDir ()
24+ protected function getCacheDir (): string
2525 {
2626 return __DIR__ .'/.cached_responses ' ;
2727 }
2828
29- public function testGetName ()
29+ public function testGetName (): void
3030 {
3131 $ provider = new TomTom ($ this ->getMockedHttpClient (), 'api_key ' );
3232 $ this ->assertEquals ('tomtom ' , $ provider ->getName ());
3333 }
3434
35- public function testGeocodeWithAddress ()
35+ public function testGeocodeWithAddress (): void
3636 {
3737 $ this ->expectException (\Geocoder \Exception \InvalidServerResponse::class);
3838
3939 $ provider = new TomTom ($ this ->getMockedHttpClient (), 'api_key ' );
4040 $ provider ->geocodeQuery (GeocodeQuery::create ('Tagensvej 47, 2200 København N ' ));
4141 }
4242
43- public function testGeocodeWithRealAddress ()
43+ public function testGeocodeWithRealAddress (): void
4444 {
4545 $ provider = new TomTom ($ this ->getHttpClient ($ _SERVER ['TOMTOM_MAP_KEY ' ]), $ _SERVER ['TOMTOM_MAP_KEY ' ]);
4646 $ results = $ provider ->geocodeQuery (GeocodeQuery::create ('Tagensvej 47, 2200 København N ' )->withLocale ('en-GB ' ));
@@ -64,7 +64,7 @@ public function testGeocodeWithRealAddress()
6464 $ this ->assertNull ($ result ->getTimezone ());
6565 }
6666
67- public function testGeocodeWithRealAddressWithFrenchLocale ()
67+ public function testGeocodeWithRealAddressWithFrenchLocale (): void
6868 {
6969 $ provider = new TomTom ($ this ->getHttpClient ($ _SERVER ['TOMTOM_MAP_KEY ' ]), $ _SERVER ['TOMTOM_MAP_KEY ' ]);
7070 $ results = $ provider ->geocodeQuery (GeocodeQuery::create ('Tagensvej 47, 2200 København N ' )->withLocale ('fr-FR ' ));
@@ -77,7 +77,7 @@ public function testGeocodeWithRealAddressWithFrenchLocale()
7777 $ this ->assertInstanceOf ('\Geocoder\Model\Address ' , $ result );
7878 }
7979
80- public function testGeocodeWithLocalhostIPv4 ()
80+ public function testGeocodeWithLocalhostIPv4 (): void
8181 {
8282 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
8383 $ this ->expectExceptionMessage ('The TomTom provider does not support IP addresses, only street addresses. ' );
@@ -86,7 +86,7 @@ public function testGeocodeWithLocalhostIPv4()
8686 $ provider ->geocodeQuery (GeocodeQuery::create ('127.0.0.1 ' ));
8787 }
8888
89- public function testGeocodeWithLocalhostIPv6 ()
89+ public function testGeocodeWithLocalhostIPv6 (): void
9090 {
9191 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
9292 $ this ->expectExceptionMessage ('The TomTom provider does not support IP addresses, only street addresses. ' );
@@ -95,7 +95,7 @@ public function testGeocodeWithLocalhostIPv6()
9595 $ provider ->geocodeQuery (GeocodeQuery::create ('::1 ' ));
9696 }
9797
98- public function testGeocodeWithIPv4 ()
98+ public function testGeocodeWithIPv4 (): void
9999 {
100100 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
101101 $ this ->expectExceptionMessage ('The TomTom provider does not support IP addresses, only street addresses. ' );
@@ -104,7 +104,7 @@ public function testGeocodeWithIPv4()
104104 $ provider ->geocodeQuery (GeocodeQuery::create ('74.200.247.59 ' ));
105105 }
106106
107- public function testGeocodeWithIPv6 ()
107+ public function testGeocodeWithIPv6 (): void
108108 {
109109 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
110110 $ this ->expectExceptionMessage ('The TomTom provider does not support IP addresses, only street addresses. ' );
@@ -113,23 +113,23 @@ public function testGeocodeWithIPv6()
113113 $ provider ->geocodeQuery (GeocodeQuery::create ('::ffff:74.200.247.59 ' ));
114114 }
115115
116- public function testWithoutApiKey ()
116+ public function testWithoutApiKey (): void
117117 {
118118 $ this ->expectException (\Geocoder \Exception \InvalidCredentials::class);
119119 $ this ->expectExceptionMessage ('No API key provided ' );
120120
121121 new TomTom ($ this ->getMockedHttpClient (), '' );
122122 }
123123
124- public function testReverse ()
124+ public function testReverse (): void
125125 {
126126 $ this ->expectException (\Geocoder \Exception \InvalidServerResponse::class);
127127
128128 $ provider = new TomTom ($ this ->getMockedHttpClient (), 'api_key ' );
129129 $ provider ->reverseQuery (ReverseQuery::fromCoordinates (1 , 2 ));
130130 }
131131
132- public function testReverseError400 ()
132+ public function testReverseError400 (): void
133133 {
134134 $ error400 = <<<'JSON'
135135{
@@ -150,7 +150,7 @@ public function testReverseError400()
150150 $ this ->assertEquals (0 , $ result ->count ());
151151 }
152152
153- public function testReverseWithRealCoordinates ()
153+ public function testReverseWithRealCoordinates (): void
154154 {
155155 if (!isset ($ _SERVER ['TOMTOM_MAP_KEY ' ])) {
156156 $ this ->markTestSkipped ('You need to configure the TOMTOM_MAP_KEY value in phpunit.xml ' );
@@ -178,7 +178,7 @@ public function testReverseWithRealCoordinates()
178178 $ this ->assertNull ($ result ->getTimezone ());
179179 }
180180
181- public function testGeocodeWithRealCoordinates ()
181+ public function testGeocodeWithRealCoordinates (): void
182182 {
183183 if (!isset ($ _SERVER ['TOMTOM_MAP_KEY ' ])) {
184184 $ this ->markTestSkipped ('You need to configure the TOMTOM_MAP_KEY value in phpunit.xml ' );
0 commit comments