Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite97a21e

Browse files
committed
Update tests to Laravel 5.5
1 parentb424b36 commite97a21e

File tree

6 files changed

+40
-32
lines changed

6 files changed

+40
-32
lines changed

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
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",

‎phpunit.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
>
1313
<testsuites>
1414
<testsuitename="Geocoder library for Laravel Test Suite">
15-
<directorysuffix="Test.php">./tests/Laravel5_3</directory>
15+
<directorysuffix="Test.php">./tests/Laravel5_5</directory>
1616
</testsuite>
1717
</testsuites>
1818
<filter>

‎tests/Laravel5_3/TestCase.php‎

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?phpnamespaceGeocoder\Laravel\Tests\Laravel5_5;
2+
3+
useIlluminate\Contracts\Console\Kernel;
4+
useIlluminate\Foundation\Application;
5+
6+
trait CreatesApplication
7+
{
8+
publicfunctioncreateApplication()
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+
}

‎tests/Laravel5_3/Providers/GeocoderServiceTest.php‎renamed to ‎tests/Laravel5_5/Providers/GeocoderServiceTest.php‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<?phpnamespaceGeocoder\Laravel\Tests\Laravel5_3\Providers;
1+
<?phpnamespaceGeocoder\Laravel\Tests\Laravel5_5\Providers;
22

33
useGeocoder\Exception\FunctionNotFound;
4-
useGeocoder\Laravel\Tests\Laravel5_3\TestCase;
4+
useGeocoder\Laravel\Tests\Laravel5_5\TestCase;
55
useGeocoder\Laravel\Exceptions\InvalidDumperException;
66
useGeocoder\Laravel\Facades\Geocoder;
77
useGeocoder\Laravel\ProviderAndDumperAggregator;
@@ -268,6 +268,13 @@ public function testGetProviders()
268268
$this->assertTrue($providers->has('google_maps'));
269269
}
270270

271+
publicfunctiontestGetProvider()
272+
{
273+
$provider =app('geocoder')->getProvider();
274+
275+
$this->assertEquals($provider->getName(),'chain');
276+
}
277+
271278
publicfunctiontestJapaneseCharacterGeocoding()
272279
{
273280
$cacheKey =str_slug(strtolower(urlencode('108-0075 東京都港区港南2丁目16-3')));

‎tests/Laravel5_5/TestCase.php‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?phpnamespaceGeocoder\Laravel\Tests\Laravel5_5;
2+
3+
useIlluminate\Contracts\Console\Kernel;
4+
useIlluminate\Foundation\Testing\TestCaseasBaseTestCase;
5+
useIlluminate\Foundation\Testing\RefreshDatabase;
6+
7+
abstractclass TestCaseextends BaseTestCase
8+
{
9+
use CreatesApplication;
10+
use RefreshDatabase;
11+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp