You are here

public function DatabaseTest::testFindDriverAutoloadDirectory in Drupal 9

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

@covers ::findDriverAutoloadDirectory @dataProvider providerFindDriverAutoloadDirectory

File

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

Class

DatabaseTest
@coversDefaultClass \Drupal\Core\Database\Database

Namespace

Drupal\Tests\Core\Database

Code

public function testFindDriverAutoloadDirectory($expected, $namespace) {
  new Settings([
    'extension_discovery_scan_tests' => TRUE,
  ]);

  // The only module that provides a driver in core is a test module.
  $this
    ->assertSame($expected, Database::findDriverAutoloadDirectory($namespace, $this->root));
}