public function InstallerObjectTest::providerDbInstallerObject in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php \Drupal\Tests\Core\Database\InstallerObjectTest::providerDbInstallerObject()
- 9 core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php \Drupal\Tests\Core\Database\InstallerObjectTest::providerDbInstallerObject()
Data provider for testDbUrlToConnectionConversion().
Return value
array Array of arrays with the following elements:
- driver: The driver name.
- namespace: The namespace providing the driver.
- class: The fully qualified class name of the expected install task.
File
- core/
tests/ Drupal/ Tests/ Core/ Database/ InstallerObjectTest.php, line 60
Class
- InstallerObjectTest
- Tests the db_installer_object() function that is used during installation.
Namespace
Drupal\Tests\Core\DatabaseCode
public function providerDbInstallerObject() {
return [
// A driver only in the core namespace.
[
'mysql',
"Drupal\\mysql\\Driver\\Database\\mysql",
MysqlInstallTasks::class,
],
// A driver only in the custom namespace.
[
'fake',
"Drupal\\Driver\\Database\\fake",
FakeInstallTasks::class,
],
// A driver in both namespaces. The custom one takes precedence.
[
'corefake',
"Drupal\\Driver\\Database\\corefake",
CustomCoreFakeInstallTasks::class,
],
// A driver from a module that has a different name as the driver.
[
'DrivertestMysql',
"Drupal\\driver_test\\Driver\\Database\\DrivertestMysql",
DriverTestMysqlInstallTasks::class,
],
];
}