'foo://bar:baz@test1', 'test2', "Can not convert 'foo://bar:baz@test1' to a database connection, class 'Drupal\\Driver\\Database\\foo\\Connection' does not exist"
],
];
} /**
* @covers ::getConnectionInfoAsUrl
*
* @dataProvider providerGetConnectionInfoAsUrl
*/
public function testGetConnectionInfoAsUrl(array
$info,
$expected_url) { Database::
addConnectionInfo('default', 'default',
$info);
$url = Database::
getConnectionInfoAsUrl();
$this->
assertEquals($expected_url,
$url);
} /**
* Data provider for testGetConnectionInfoAsUrl().
*
* @return array
* Array of arrays with the following elements:
* - An array mocking the database connection info. Possible keys are
* database, username, password, prefix, host, port, namespace and driver.
* - The expected URL after conversion.
*/