Skip to content

Commit

Permalink
Fix up test harness
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 13, 2023
1 parent 4d2de42 commit 5569f24
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,12 @@
class_alias(AppView::class, 'App\View\AppView');

// Ensure default test connection is defined
if (!getenv('db_class')) {
putenv('db_class=Cake\Database\Driver\Sqlite');
putenv('db_dsn=sqlite::memory:');
if (!getenv('DB_URL')) {
putenv('DB_URL=sqlite:///:memory:');
}

ConnectionManager::setConfig('test', [
'className' => 'Cake\Database\Connection',
'driver' => getenv('db_class') ?: null,
'dsn' => getenv('db_dsn') ?: null,
'url' => getenv('DB_URL') ?: null,
'timezone' => 'UTC',
'quoteIdentifiers' => true,
'cacheMetadata' => true,
Expand Down

0 comments on commit 5569f24

Please sign in to comment.