Skip to content

Commit bf09351

Browse files
authored
add test
1 parent 79b1c56 commit bf09351

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/ConnectionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ public static function dataConnectionConfig(): Generator
190190
'expectedDatabaseName' => 'tests',
191191
'config' => ['dsn' => 'mongodb://some-host:12345/tests'],
192192
];
193+
194+
yield 'Database is extracted from DSN with CA path in options' => [
195+
'expectedUri' => 'mongodb://some-host:12345/tests?tls=true&tlsCAFile=/path/to/ca.pem&retryWrites=false',
196+
'expectedDatabaseName' => 'tests',
197+
'config' => ['dsn' => 'mongodb://some-host:12345/tests?tls=true&tlsCAFile=/path/to/ca.pem&retryWrites=false'],
198+
];
193199
}
194200

195201
#[DataProvider('dataConnectionConfig')]

0 commit comments

Comments
 (0)