function DatabaseTest::testFindDriverAutoloadDirectoryException

@covers ::findDriverAutoloadDirectory
@dataProvider providerFindDriverAutoloadDirectoryException

File

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

Class

DatabaseTest
@coversDefaultClass \Drupal\Core\Database\Database[[api-linebreak]]

Namespace

Drupal\Tests\Core\Database

Code

public function testFindDriverAutoloadDirectoryException($expected_message, $namespace, $include_tests) {
  new Settings([
    'extension_discovery_scan_tests' => $include_tests,
  ]);
  if ($include_tests === FALSE) {
    // \Drupal\Core\Extension\ExtensionDiscovery::scan() needs
    // drupal_valid_test_ua().
    include $this->root . '/core/includes/bootstrap.inc';
  }
  $this->expectException(\RuntimeException::class);
  $this->expectExceptionMessage($expected_message);
  Database::findDriverAutoloadDirectory($namespace, $this->root);
}

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