function ConnectionTest::providerGetDriverClass

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerGetDriverClass()
  2. 10 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerGetDriverClass()
  3. 11.x core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerGetDriverClass()

Dataprovider for testGetDriverClass().

Return value

array Array of arrays with the following elements:

  • Expected namespaced class name.
  • Driver.
  • Namespace.
  • Class name without namespace.

File

core/tests/Drupal/Tests/Core/Database/ConnectionTest.php, line 150

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public function providerGetDriverClass() {
    return [
        [
            'nonexistent_class',
            '\\',
            'nonexistent_class',
        ],
        [
            'Drupal\\Tests\\Core\\Database\\Stub\\Select',
            NULL,
            'Select',
        ],
        [
            'Drupal\\Tests\\Core\\Database\\Stub\\Driver\\Schema',
            'Drupal\\Tests\\Core\\Database\\Stub\\Driver',
            'Schema',
        ],
    ];
}

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