function DatabaseTest::testFindDriverAutoloadDirectory
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Database/DatabaseTest.php \Drupal\Tests\Core\Database\DatabaseTest::testFindDriverAutoloadDirectory()
- 8.9.x core/tests/Drupal/Tests/Core/Database/DatabaseTest.php \Drupal\Tests\Core\Database\DatabaseTest::testFindDriverAutoloadDirectory()
@covers ::findDriverAutoloadDirectory @dataProvider providerFindDriverAutoloadDirectory @group legacy
File
-
core/
tests/ Drupal/ Tests/ Core/ Database/ DatabaseTest.php, line 74
Class
- DatabaseTest
- @coversDefaultClass \Drupal\Core\Database\Database
Namespace
Drupal\Tests\Core\DatabaseCode
public function testFindDriverAutoloadDirectory($expected, $namespace, $include_test_drivers) : void {
$this->expectDeprecation('Drupal\\Core\\Database\\Database::findDriverAutoloadDirectory() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use DatabaseDriverList::getList() instead. See https://www.drupal.org/node/3258175');
// The only module that provides a driver in core is a test module.
if (!$expected) {
$this->expectException(UnknownExtensionException::class);
Database::findDriverAutoloadDirectory($namespace, $this->root, $include_test_drivers);
}
else {
$this->assertSame($expected, Database::findDriverAutoloadDirectory($namespace, $this->root, $include_test_drivers));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.