/**
* @dataProvider validEnvProvider
*
* @param array<string, string|bool> $env
*/
public function testFromEnv(array
$env, DatabaseConnectionInformation
$expected): void
{ $this->
setEnvVars($env);
$info = DatabaseConnectionInformation::
fromEnv();
static::
assertSame($expected->
getVars(),
$info->
getVars());
} public static function validEnvProvider(): \Generator
{ yield 'only database' =>
[ [ 'DATABASE_URL' => 'mysql://root:root@localhost:3306/shopware',
],
(new DatabaseConnectionInformation())->
assign([ 'hostname' => 'localhost',
'port' => 3306,