You are here

public function ConnectionTest::providerGetDriverClass in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerGetDriverClass()
  2. 9 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 125

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',
    ],
    // 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\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Condition',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Condition',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Delete',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Delete',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\ExceptionHandler',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'ExceptionHandler',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Insert',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Insert',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Merge',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Merge',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\PagerSelectExtender',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'PagerSelectExtender',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Schema',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Schema',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\SearchQuery',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'SearchQuery',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Select',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Select',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\TableSortExtender',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'TableSortExtender',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Transaction',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Transaction',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Truncate',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Truncate',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Update',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Update',
    ],
    [
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses\\Upsert',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Upsert',
    ],
    [
      'Drupal\\Core\\Database\\Query\\PagerSelectExtender',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Drupal\\Core\\Database\\Query\\PagerSelectExtender',
    ],
    [
      '\\Drupal\\Core\\Database\\Query\\PagerSelectExtender',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      '\\Drupal\\Core\\Database\\Query\\PagerSelectExtender',
    ],
    [
      'Drupal\\Core\\Database\\Query\\TableSortExtender',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Drupal\\Core\\Database\\Query\\TableSortExtender',
    ],
    [
      '\\Drupal\\Core\\Database\\Query\\TableSortExtender',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      '\\Drupal\\Core\\Database\\Query\\TableSortExtender',
    ],
    [
      'Drupal\\search\\SearchQuery',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      'Drupal\\search\\SearchQuery',
    ],
    [
      '\\Drupal\\search\\SearchQuery',
      'Drupal\\corefake\\Driver\\Database\\corefakeWithAllCustomClasses',
      '\\Drupal\\search\\SearchQuery',
    ],
  ];
}