Skip to content

Commit 59a2c5c

Browse files
committed
Add more tests
1 parent 6e02df5 commit 59a2c5c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/Laravel5_3/Providers/GeocoderServiceTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,22 @@ public function testItCanUseMaxMindBinaryWithoutProvider()
226226

227227
app('geocoder')->registerProvider($provider);
228228
}
229+
230+
public function testGetNameReturnsString()
231+
{
232+
$this->assertEquals('provider_aggregator', app('geocoder')->getName());
233+
}
234+
235+
public function testLimitingOfResults()
236+
{
237+
$expectedLimit = 1;
238+
239+
app('geocoder')->limit($expectedLimit);
240+
$actualLimit = app('geocoder')->getLimit();
241+
$results = app('geocoder')->geocode('1600 Pennsylvania Ave., Washington, DC USA')
242+
->get();
243+
244+
$this->assertEquals($expectedLimit, $actualLimit);
245+
$this->assertEquals($expectedLimit, $results->count());
246+
}
229247
}

0 commit comments

Comments
 (0)