Compare commits

...

2 Commits

View File

@ -578,6 +578,10 @@ class TestSessionEnvironment
$this->oldDatabaseName = $databaseConfig['database'];
$databaseConfig['database'] = $state->database;
DB::connect($databaseConfig);
// This is required for CMS 5.4+
if (method_exists(DB::class, 'hasConfig') && DB::hasConfig('primary')) {
DB::connect($databaseConfig, 'primary');
}
}
}
}