We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 829b936 commit a305573Copy full SHA for a305573
tests/Database/Connection.lazy.phpt
@@ -40,7 +40,11 @@ test(function () { // connect & disconnect
40
$options = Tester\Environment::loadData() + ['user' => NULL, 'password' => NULL];
41
$connections = 1;
42
43
- $connection = new Nette\Database\Connection($options['dsn'], $options['user'], $options['password']);
+ try {
44
+ $connection = new Nette\Database\Connection($options['dsn'], $options['user'], $options['password']);
45
+ } catch (PDOException $e) {
46
+ Tester\Environment::skip("Connection to '$options[dsn]' failed. Reason: " . $e->getMessage());
47
+ }
48
$connection->onConnect[] = function () use (& $connections) {
49
$connections++;
50
};
0 commit comments