function DatabaseTest::providerFindDriverAutoloadDirectoryException

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Database/DatabaseTest.php \Drupal\Tests\Core\Database\DatabaseTest::providerFindDriverAutoloadDirectoryException()
  2. 10 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 91

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,
        ],
    ];
}

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