Skip to content

Commit 1739f11

Browse files
committed
WIP - getting Travis build to green
1 parent b3bc7d6 commit 1739f11

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

config/geocoder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
'en-US',
2727
env('BING_MAPS_API_KEY'),
2828
],
29+
FreeGeoIp::class => [],
2930
GoogleMaps::class => [
3031
'us',
3132
env('GOOGLE_MAPS_API_KEY'),

tests/Laravel5_3/Providers/GeocoderServiceTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public function testItResolvesAGivenIPAddress()
6767

6868
// Act
6969
$results = app('geocoder')
70+
->using('free_geo_ip')
7071
->geocode('72.229.28.185')
7172
->get();
7273

@@ -156,7 +157,7 @@ public function testConfig()
156157
{
157158
$this->assertEquals(999999999, config('geocoder.cache-duraction'));
158159
$this->assertTrue(is_array($providers = $this->app['config']->get('geocoder.providers')));
159-
$this->assertCount(3, $providers);
160+
$this->assertCount(4, $providers);
160161
$this->assertArrayHasKey(GoogleMaps::class, $providers[Chain::class]);
161162
$this->assertArrayHasKey(FreeGeoIp::class, $providers[Chain::class]);
162163
$this->assertSame(CurlAdapter::class, $this->app['config']->get('geocoder.adapter'));
@@ -239,7 +240,8 @@ public function testLimitingOfResults()
239240

240241
app('geocoder')->limit($expectedLimit);
241242
$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')
243245
->get();
244246

245247
$this->assertEquals($expectedLimit, $actualLimit);
@@ -262,13 +264,11 @@ public function testFetchingAllResults()
262264
public function testGetProviders()
263265
{
264266
$providers = app('geocoder')->getProviders();
265-
266267
$this->assertTrue($providers->has('chain'));
267268
$this->assertTrue($providers->has('bing_maps'));
268269
$this->assertTrue($providers->has('google_maps'));
269270
}
270271

271-
272272
public function testJapaneseCharacterGeocoding()
273273
{
274274
$cacheKey = str_slug(strtolower(urlencode('108-0075 東京都港区港南2丁目16-3')));

0 commit comments

Comments
 (0)