Skip to content

Commit 8f07737

Browse files
committed
Implement stand-along package tests
1 parent 4a4e152 commit 8f07737

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

composer.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,22 @@
3030
"require-dev": {
3131
"orchestra/testbench": "~3.0",
3232
"satooshi/php-coveralls": "~0.6",
33-
"phpunit/phpunit": "~4.5"
33+
"fzaninotto/faker": "~1.4",
34+
"mockery/mockery": "0.9.*",
35+
"phpunit/phpunit": "~5.0",
36+
"symfony/css-selector": "3.1.*",
37+
"symfony/dom-crawler": "3.1.*",
38+
"doctrine/dbal": "^2.5",
39+
"laravel/laravel": "^5.3"
3440
},
3541
"autoload": {
3642
"psr-4": {
37-
"Geocoder\\Laravel\\": "src/",
38-
"Geocoder\\Laravel\\Tests\\": "tests/"
43+
"Geocoder\\Laravel\\": "src/"
3944
}
4045
},
4146
"autoload-dev": {
4247
"psr-4": {
48+
"App\\": "vendor/laravel/laravel/app/",
4349
"Geocoder\\Laravel\\Tests\\": "tests/"
4450
}
4551
},

phpunit.xml

+9
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,13 @@
2121
<directory>./src/</directory>
2222
</whitelist>
2323
</filter>
24+
<php>
25+
<env name="APP_KEY" value="base64:Xgs1LQt1GdVHhD6qyYCXnyq61DE3UKqJ5k2SJc+Nw2g="/>
26+
<env name="APP_ENV" value="testing"/>
27+
<env name="CACHE_DRIVER" value="array"/>
28+
<env name="SESSION_DRIVER" value="array"/>
29+
<env name="QUEUE_DRIVER" value="sync"/>
30+
<env name="DB_CONNECTION" value="sqlite"/>
31+
<env name="DB_DATABASE" value=":memory:"/>
32+
</php>
2433
</phpunit>

tests/Laravel5_3/TestCase.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php namespace Geocoder\Laravel\Tests\Laravel5_3;
22

3+
use Geocoder\Laravel\Providers\GeocoderService;
34
use Illuminate\Contracts\Console\Kernel;
45
use Illuminate\Foundation\Application;
56
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
@@ -16,8 +17,9 @@ abstract class TestCase extends BaseTestCase
1617

1718
public function createApplication() : Application
1819
{
19-
$app = require __DIR__ . '/../../../../../bootstrap/app.php';
20+
$app = require __DIR__ . '/../../vendor/laravel/laravel/bootstrap/app.php';
2021
$app->make(Kernel::class)->bootstrap();
22+
$app->register(GeocoderService::class);
2123

2224
return $app;
2325
}

0 commit comments

Comments
 (0)