function InstallerObjectTest::providerDbInstallerObject
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php \Drupal\Tests\Core\Database\InstallerObjectTest::providerDbInstallerObject()
- 8.9.x 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 62
Class
- InstallerObjectTest
- Tests the db_installer_object() function that is used during installation.
Namespace
Drupal\Tests\Core\DatabaseCode
public static 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.
// @phpstan-ignore-next-line
[
'fake',
"Drupal\\Driver\\Database\\fake",
FakeInstallTasks::class,
],
// A driver in both namespaces. The custom one takes precedence.
// @phpstan-ignore-next-line
[
'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.