function ConnectionTest::providerGetDriverClass

Same name in this branch
  1. main core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerGetDriverClass()
Same name and namespace in other branches
  1. 11.x 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. 9 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerGetDriverClass()
  4. 8.9.x core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerGetDriverClass()
  5. 11.x core/modules/search/tests/src/Unit/Database/ConnectionTest.php \Drupal\Tests\search\Unit\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/modules/search/tests/src/Unit/Database/ConnectionTest.php, line 31

Class

ConnectionTest
Tests the connections for the Search queries.

Namespace

Drupal\Tests\search\Unit\Database

Code

public static function providerGetDriverClass() : array {
  return [
    [
      'SearchQuery',
      'Drupal\\SearchFake\\Driver\\Database\\SearchFake',
      'SearchQuery',
    ],
    [
      'Drupal\\search_fake\\Driver\\Database\\SearchFakeWithAllCustomClasses\\SearchQuery',
      'Drupal\\search_fake\\Driver\\Database\\SearchFakeWithAllCustomClasses',
      'SearchQuery',
    ],
    [
      'Drupal\\search\\SearchQuery',
      'Drupal\\search_fake\\Driver\\Database\\SearchFakeWithAllCustomClasses',
      'Drupal\\search\\SearchQuery',
    ],
    [
      '\\Drupal\\search\\SearchQuery',
      'Drupal\\search_fake\\Driver\\Database\\SearchFakeWithAllCustomClasses',
      '\\Drupal\\search\\SearchQuery',
    ],
  ];
}

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