/**
* @dataProvider fromStringProvider
*/
public function testFromString(string
$string, Dsn
$dsn) { $this->
assertEquals($dsn, Dsn::
fromString($string));
} public function testGetOption() { $options =
['with_value' => 'some value', 'nullable' => null
];
$dsn =
new Dsn('smtp', 'example.com', null, null, null,
$options);
$this->
assertSame('some value',
$dsn->
getOption('with_value'
));
$this->
assertSame('default',
$dsn->
getOption('nullable', 'default'
));
$this->
assertSame('default',
$dsn->
getOption('not_existent_property', 'default'
));
} /**
* @dataProvider invalidDsnProvider
*/
public function testInvalidDsn(string
$dsn, string
$exceptionMessage) {