protected function SqlModeTest::getDatabaseConnectionInfo in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Database/SqlModeTest.php \Drupal\KernelTests\Core\Database\SqlModeTest::getDatabaseConnectionInfo()
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ SqlModeTest.php, line 36
Class
- SqlModeTest
- Tests compatibility of the MySQL driver with various sql_mode options.
Namespace
Drupal\KernelTests\Core\DatabaseCode
protected function getDatabaseConnectionInfo() {
$info = parent::getDatabaseConnectionInfo();
// This runs during setUp(), so is not yet skipped for non MySQL databases.
// We defer skipping the test to later in setUp(), so that that can be
// based on databaseType() rather than 'driver', but here all we have to go
// on is 'driver'.
if ($info['default']['driver'] === 'mysql') {
$info['default']['init_commands']['sql_mode'] = "SET sql_mode = ''";
}
return $info;
}