You are here

public function ConnectionTest::providerGetDriverClass in Drupal 8

Same name and namespace 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()

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',
    ],
  ];
}