You are here

public function UrlConversionTest::testGetConnectionInfoAsUrl in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php \Drupal\Tests\Core\Database\UrlConversionTest::testGetConnectionInfoAsUrl()

@covers ::getConnectionInfoAsUrl

@dataProvider providerGetConnectionInfoAsUrl

File

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

Class

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

Namespace

Drupal\Tests\Core\Database

Code

public function testGetConnectionInfoAsUrl(array $info, $expected_url) {
  Database::addConnectionInfo('default', 'default', $info);
  $url = Database::getConnectionInfoAsUrl();
  $this
    ->assertEquals($expected_url, $url);
}