Skip to content

Commit c79c4e5

Browse files
committed
Add more tests
1 parent 7a38671 commit c79c4e5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/Laravel5_3/Providers/GeocoderServiceTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,26 @@ public function testLimitingOfResults()
244244
$this->assertEquals($expectedLimit, $actualLimit);
245245
$this->assertEquals($expectedLimit, $results->count());
246246
}
247+
248+
public function testFetchingAllResults()
249+
{
250+
$expectedResults = app('geocoder')
251+
->geocode('1600 Pennsylvania Ave., Washington, DC USA')
252+
->get()
253+
->all();
254+
$actualResults = app('geocoder')
255+
->geocode('1600 Pennsylvania Ave., Washington, DC USA')
256+
->all();
257+
258+
$this->assertEquals($expectedResults, $actualResults);
259+
}
260+
261+
public function testGetProviders()
262+
{
263+
$providers = app('geocoder')->getProviders();
264+
265+
$this->assertTrue($providers->has('chain'));
266+
$this->assertTrue($providers->has('bing_maps'));
267+
$this->assertTrue($providers->has('google_maps'));
268+
}
247269
}

0 commit comments

Comments
 (0)