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. 8.9.x 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()

Data provider for testGetDriverClass().

Return value

array Array of arrays with the following elements:

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

File

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

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public static function providerGetDriverClass() {
    return [
        [
            'nonexistent_class',
            '\\',
            'nonexistent_class',
        ],
        [
            'Drupal\\Tests\\Core\\Database\\Stub\\Select',
            NULL,
            'Select',
        ],
        // Tests with the CoreFake database driver. This driver has no custom
        // driver classes.
[
            'Drupal\\Core\\Database\\Query\\Condition',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Condition',
        ],
        [
            'Drupal\\Core\\Database\\Query\\Delete',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Delete',
        ],
        [
            'Drupal\\Core\\Database\\ExceptionHandler',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'ExceptionHandler',
        ],
        [
            'Drupal\\Core\\Database\\Query\\Insert',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Insert',
        ],
        [
            'Drupal\\Core\\Database\\Query\\Merge',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Merge',
        ],
        [
            'PagerSelectExtender',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'PagerSelectExtender',
        ],
        [
            'Drupal\\Core\\Database\\Schema',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Schema',
        ],
        [
            'SearchQuery',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'SearchQuery',
        ],
        [
            'Drupal\\Core\\Database\\Query\\Select',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Select',
        ],
        [
            'Drupal\\Core\\Database\\Transaction',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Transaction',
        ],
        [
            'TableSortExtender',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'TableSortExtender',
        ],
        [
            'Drupal\\Core\\Database\\Query\\Truncate',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Truncate',
        ],
        [
            'Drupal\\Core\\Database\\Query\\Update',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Update',
        ],
        [
            'Drupal\\Core\\Database\\Query\\Upsert',
            'Drupal\\CoreFake\\Driver\\Database\\CoreFake',
            'Upsert',
        ],
        // Tests with the CoreFakeWithAllCustomClasses database driver. This
        // driver has custom driver classes for all classes.
[
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Condition',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Condition',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Delete',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Delete',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\ExceptionHandler',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'ExceptionHandler',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Insert',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Insert',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Merge',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Merge',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\PagerSelectExtender',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'PagerSelectExtender',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Schema',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Schema',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\SearchQuery',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'SearchQuery',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Select',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Select',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\TableSortExtender',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'TableSortExtender',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Transaction',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Transaction',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Truncate',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Truncate',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Update',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Update',
        ],
        [
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\Upsert',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Upsert',
        ],
        [
            'Drupal\\Core\\Database\\Query\\PagerSelectExtender',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Drupal\\Core\\Database\\Query\\PagerSelectExtender',
        ],
        [
            '\\Drupal\\Core\\Database\\Query\\PagerSelectExtender',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            '\\Drupal\\Core\\Database\\Query\\PagerSelectExtender',
        ],
        [
            'Drupal\\Core\\Database\\Query\\TableSortExtender',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Drupal\\Core\\Database\\Query\\TableSortExtender',
        ],
        [
            '\\Drupal\\Core\\Database\\Query\\TableSortExtender',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            '\\Drupal\\Core\\Database\\Query\\TableSortExtender',
        ],
        [
            'Drupal\\search\\SearchQuery',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            'Drupal\\search\\SearchQuery',
        ],
        [
            '\\Drupal\\search\\SearchQuery',
            'Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses',
            '\\Drupal\\search\\SearchQuery',
        ],
    ];
}

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