function DatabaseTest::testFindDriverAutoloadDirectoryException

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/DatabaseTest.php \Drupal\Tests\Core\Database\DatabaseTest::testFindDriverAutoloadDirectoryException()
  2. 8.9.x core/tests/Drupal/Tests/Core/Database/DatabaseTest.php \Drupal\Tests\Core\Database\DatabaseTest::testFindDriverAutoloadDirectoryException()

@covers ::findDriverAutoloadDirectory @dataProvider providerFindDriverAutoloadDirectoryException @group legacy

File

core/tests/Drupal/Tests/Core/Database/DatabaseTest.php, line 104

Class

DatabaseTest
@coversDefaultClass \Drupal\Core\Database\Database

Namespace

Drupal\Tests\Core\Database

Code

public function testFindDriverAutoloadDirectoryException($expected_message, $namespace, $include_tests) : 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');
    $this->expectException(UnknownExtensionException::class);
    $this->expectExceptionMessage($expected_message);
    Database::findDriverAutoloadDirectory($namespace, $this->root, $include_tests);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.