function InstallerObjectTest::providerDbInstallerObject
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php \Drupal\Tests\Core\Database\InstallerObjectTest::providerDbInstallerObject()
- 10 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 58
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,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.