Skip to content

Commit 48eaf48

Browse files
committed
Database config params added to phpunit.xml
1 parent e74a61b commit 48eaf48

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

phpunit.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
</testsuite>
1212
</testsuites>
1313
<php>
14+
<env name="DB_DRIVER" value="mysql"/>
15+
<env name="DB_HOST" value="127.0.0.1"/>
16+
<env name="DB_PORT" value="3306"/>
1417
<env name="DB_USERNAME" value="root"/>
1518
<env name="DB_DATABASE" value="laravel_spatial_test"/>
1619
</php>

tests/TestCase.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@ protected function defineDatabaseMigrations(): void
1111
$this->loadMigrationsFrom(__DIR__ . '/database/migrations');
1212
}
1313

14-
protected function defineEnvironment($app): void
15-
{
16-
$app['config']->set('database.default', 'mysql');
17-
$app['config']->set('database.connections.mysql', [
18-
'driver' => 'mysql',
19-
'host' => '127.0.0.1',
20-
'port' => env('DB_PORT', 3306),
21-
]);
22-
}
23-
2414
protected function getPackageProviders($app): array
2515
{
2616
return [

0 commit comments

Comments
 (0)