You are here

public function DatabaseTest::providerFindDriverAutoloadDirectoryException 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::providerFindDriverAutoloadDirectoryException()
  2. 9 core/tests/Drupal/Tests/Core/Database/DatabaseTest.php \Drupal\Tests\Core\Database\DatabaseTest::providerFindDriverAutoloadDirectoryException()

Data provider for ::testFindDriverAutoloadDirectoryException().

Return value

array

File

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

Class

DatabaseTest
@coversDefaultClass \Drupal\Core\Database\Database

Namespace

Drupal\Tests\Core\Database

Code

public function providerFindDriverAutoloadDirectoryException() {
  return [
    'test module but tests not included' => [
      "Cannot find the module 'driver_test' for the database driver namespace 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysql'",
      'Drupal\\driver_test\\Driver\\Database\\DrivertestMysql',
      FALSE,
    ],
    'non-existent driver in test module' => [
      "Cannot find the database driver namespace 'Drupal\\driver_test\\Driver\\Database\\sqlite' in module 'driver_test'",
      'Drupal\\driver_test\\Driver\\Database\\sqlite',
      TRUE,
    ],
    'non-existent module' => [
      "Cannot find the module 'does_not_exist' for the database driver namespace 'Drupal\\does_not_exist\\Driver\\Database\\mysql'",
      'Drupal\\does_not_exist\\Driver\\Database\\mysql',
      TRUE,
    ],
  ];
}