function DatabaseTest::providerFindDriverAutoloadDirectoryException

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

Class

DatabaseTest
@coversDefaultClass \Drupal\Core\Database\Database

Namespace

Drupal\Tests\Core\Database

Code

public static function providerFindDriverAutoloadDirectoryException() {
    return [
        'test module but tests not included' => [
            "The database_driver Drupal\\driver_test\\Driver\\Database\\DrivertestMysql does not exist.",
            'Drupal\\driver_test\\Driver\\Database\\DrivertestMysql',
            FALSE,
        ],
        'non-existent driver in test module' => [
            "The database_driver Drupal\\driver_test\\Driver\\Database\\sqlite does not exist.",
            'Drupal\\driver_test\\Driver\\Database\\sqlite',
            TRUE,
        ],
        'non-existent module' => [
            "The database_driver Drupal\\does_not_exist\\Driver\\Database\\mysql does not exist.",
            '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.