@@ -67,6 +67,7 @@ public function testItResolvesAGivenIPAddress()
67
67
68
68
// Act
69
69
$ results = app ('geocoder ' )
70
+ ->using ('free_geo_ip ' )
70
71
->geocode ('72.229.28.185 ' )
71
72
->get ();
72
73
@@ -156,7 +157,7 @@ public function testConfig()
156
157
{
157
158
$ this ->assertEquals (999999999 , config ('geocoder.cache-duraction ' ));
158
159
$ this ->assertTrue (is_array ($ providers = $ this ->app ['config ' ]->get ('geocoder.providers ' )));
159
- $ this ->assertCount (3 , $ providers );
160
+ $ this ->assertCount (4 , $ providers );
160
161
$ this ->assertArrayHasKey (GoogleMaps::class, $ providers [Chain::class]);
161
162
$ this ->assertArrayHasKey (FreeGeoIp::class, $ providers [Chain::class]);
162
163
$ this ->assertSame (CurlAdapter::class, $ this ->app ['config ' ]->get ('geocoder.adapter ' ));
@@ -239,7 +240,8 @@ public function testLimitingOfResults()
239
240
240
241
app ('geocoder ' )->limit ($ expectedLimit );
241
242
$ actualLimit = app ('geocoder ' )->getLimit ();
242
- $ results = app ('geocoder ' )->geocode ('1600 Pennsylvania Ave., Washington, DC USA ' )
243
+ $ results = app ('geocoder ' )->using ('chain ' )
244
+ ->geocode ('1600 Pennsylvania Ave., Washington, DC USA ' )
243
245
->get ();
244
246
245
247
$ this ->assertEquals ($ expectedLimit , $ actualLimit );
@@ -262,13 +264,11 @@ public function testFetchingAllResults()
262
264
public function testGetProviders ()
263
265
{
264
266
$ providers = app ('geocoder ' )->getProviders ();
265
-
266
267
$ this ->assertTrue ($ providers ->has ('chain ' ));
267
268
$ this ->assertTrue ($ providers ->has ('bing_maps ' ));
268
269
$ this ->assertTrue ($ providers ->has ('google_maps ' ));
269
270
}
270
271
271
-
272
272
public function testJapaneseCharacterGeocoding ()
273
273
{
274
274
$ cacheKey = str_slug (strtolower (urlencode ('108-0075 東京都港区港南2丁目16-3 ' )));
0 commit comments