function UrlConversionTest::testDbUrlToConnectionConversion

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php \Drupal\Tests\Core\Database\UrlConversionTest::testDbUrlToConnectionConversion()
  2. 8.9.x core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php \Drupal\Tests\Core\Database\UrlConversionTest::testDbUrltoConnectionConversion()
  3. 11.x core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php \Drupal\Tests\Core\Database\UrlConversionTest::testDbUrlToConnectionConversion()

@covers ::convertDbUrlToConnectionInfo

@dataProvider providerConvertDbUrlToConnectionInfo

File

core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php, line 31

Class

UrlConversionTest
Tests for database URL to/from database connection array conversions.

Namespace

Drupal\Tests\Core\Database

Code

public function testDbUrlToConnectionConversion($url, $database_array, $include_test_drivers) : void {
    $result = Database::convertDbUrlToConnectionInfo($url, $this->root, $include_test_drivers);
    $this->assertEquals($database_array, $result);
}

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