if defined in the phpunit file, it's not possible to override them like so: db_class=x; phpunit... as phpunit will overwrite the existing environment variables with the xml-defined settings
@@ -97,6 +97,12 @@ Cache::config([
]
]);
+// Ensure default test connection is defined
+if (!getenv('db_class')) {
+ putenv('db_class=Cake\Database\Driver\Sqlite');
+ putenv('db_dsn=sqlite::memory:');
+}
+
ConnectionManager::config('test', [
'className' => 'Cake\Database\Connection',
'driver' => getenv('db_class'),