function DatabaseDriverListTest::testGet

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php \Drupal\Tests\Core\Extension\DatabaseDriverListTest::testGet()

@covers ::get

@dataProvider providerDatabaseDrivers

File

core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php, line 23

Class

DatabaseDriverListTest
Tests DatabaseDriverList methods.

Namespace

Drupal\Tests\Core\Extension

Code

public function testGet(string $driverName, string $moduleName, string $driverExtensionName) : void {
    $driverExtension = Database::getDriverList()->includeTestDrivers(TRUE)
        ->get($driverExtensionName);
    $this->assertSame($driverExtensionName, $driverExtension->getName());
    $this->assertSame($moduleName, $driverExtension->getModule()
        ->getName());
    $this->assertSame($driverName, $driverExtension->getDriverName());
}

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