You are here

public function DatabaseTest::testFindDriverAutoloadDirectoryException in Drupal 10

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

@covers ::findDriverAutoloadDirectory @dataProvider providerFindDriverAutoloadDirectoryException

File

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

Class

DatabaseTest
@coversDefaultClass \Drupal\Core\Database\Database

Namespace

Drupal\Tests\Core\Database

Code

public function testFindDriverAutoloadDirectoryException($expected_message, $namespace, $include_tests) {
  new Settings([
    'extension_discovery_scan_tests' => $include_tests,
  ]);
  $this
    ->expectException(\RuntimeException::class);
  $this
    ->expectExceptionMessage($expected_message);
  Database::findDriverAutoloadDirectory($namespace, $this->root);
}