Skip to content

Commit

Permalink
Ensure correct DB name across Laravel versions
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Oct 2, 2024
1 parent fc27b7e commit 114a480
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ jobs:
postgresql:
image: postgres:15
env:
POSTGRES_DB: forge
POSTGRES_USER: forge
POSTGRES_DB: laravel
POSTGRES_USER: laravel
POSTGRES_PASSWORD: password
ports:
- 5432:5432
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
run: vendor/bin/phpunit
env:
DB_CONNECTION: pgsql
DB_USERNAME: forge
DB_USERNAME: laravel
DB_PASSWORD: password

sqlite:
Expand Down
5 changes: 5 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ protected function getPackageProviders($app)
{
return [PowerJoinsServiceProvider::class];
}

protected function getEnvironmentSetUp($app)
{
$app->config->set('databases.connections.pgsql.database', env('DB_DATABASE', 'laravel'));
}
}

0 comments on commit 114a480

Please sign in to comment.