File tree Expand file tree Collapse file tree 6 files changed +40
-32
lines changed Expand file tree Collapse file tree 6 files changed +40
-32
lines changed Original file line number Diff line number Diff line change 3838 "fzaninotto/faker" : " ~1.4" ,
3939 "geocoder-php/bing-maps-provider" : " ^4.0" ,
4040 "geocoder-php/maxmind-binary-provider" : " ^4.0" ,
41- "laravel/laravel" : " 5.4 .*" ,
41+ "laravel/laravel" : " 5.5 .*" ,
4242 "mockery/mockery" : " 0.9.*" ,
4343 "phpunit/phpunit" : " ~5.0" ,
4444 "satooshi/php-coveralls" : " dev-master@dev" ,
Original file line number Diff line number Diff line change 1212>
1313 <testsuites >
1414 <testsuite name =" Geocoder library for Laravel Test Suite" >
15- <directory suffix =" Test.php" >./tests/Laravel5_3 </directory >
15+ <directory suffix =" Test.php" >./tests/Laravel5_5 </directory >
1616 </testsuite >
1717 </testsuites >
1818 <filter >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ <?php namespace Geocoder \Laravel \Tests \Laravel5_5 ;
2+
3+ use Illuminate \Contracts \Console \Kernel ;
4+ use Illuminate \Foundation \Application ;
5+
6+ trait CreatesApplication
7+ {
8+ public function createApplication ()
9+ {
10+ $ app = require __DIR__ . '/../../vendor/laravel/laravel/bootstrap/app.php ' ;
11+ $ app ->make (Kernel::class)->bootstrap ();
12+ config ([
13+ 'geocoder ' => include (__DIR__ . '/../assets/testConfig.php ' ),
14+ ]);
15+
16+ return $ app ;
17+ }
18+ }
Original file line number Diff line number Diff line change 1- <?php namespace Geocoder \Laravel \Tests \Laravel5_3 \Providers ;
1+ <?php namespace Geocoder \Laravel \Tests \Laravel5_5 \Providers ;
22
33use Geocoder \Exception \FunctionNotFound ;
4- use Geocoder \Laravel \Tests \Laravel5_3 \TestCase ;
4+ use Geocoder \Laravel \Tests \Laravel5_5 \TestCase ;
55use Geocoder \Laravel \Exceptions \InvalidDumperException ;
66use Geocoder \Laravel \Facades \Geocoder ;
77use Geocoder \Laravel \ProviderAndDumperAggregator ;
@@ -268,6 +268,13 @@ public function testGetProviders()
268268 $ this ->assertTrue ($ providers ->has ('google_maps ' ));
269269 }
270270
271+ public function testGetProvider ()
272+ {
273+ $ provider = app ('geocoder ' )->getProvider ();
274+
275+ $ this ->assertEquals ($ provider ->getName (), 'chain ' );
276+ }
277+
271278 public function testJapaneseCharacterGeocoding ()
272279 {
273280 $ cacheKey = str_slug (strtolower (urlencode ('108-0075 東京都港区港南2丁目16-3 ' )));
Original file line number Diff line number Diff line change 1+ <?php namespace Geocoder \Laravel \Tests \Laravel5_5 ;
2+
3+ use Illuminate \Contracts \Console \Kernel ;
4+ use Illuminate \Foundation \Testing \TestCase as BaseTestCase ;
5+ use Illuminate \Foundation \Testing \RefreshDatabase ;
6+
7+ abstract class TestCase extends BaseTestCase
8+ {
9+ use CreatesApplication;
10+ use RefreshDatabase;
11+ }
You can’t perform that action at this time.
0 commit comments