You are here

public function ConnectionTest::providerGetDriverClass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 154
Contains \Drupal\Tests\Core\Database\ConnectionTest.

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

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