mirror of
https://github.com/dg/dibi.git
synced 2025-08-03 04:37:35 +02:00
tests: added reconnect test (#352)
This commit is contained in:
@@ -52,6 +52,17 @@ test(function () use ($config) {
|
||||
});
|
||||
|
||||
|
||||
test(function () use ($config) {
|
||||
$conn = new Connection($config);
|
||||
Assert::equal('hello', $conn->query('SELECT %s', 'hello')->fetchSingle());
|
||||
|
||||
$conn->disconnect();
|
||||
|
||||
$conn->connect();
|
||||
Assert::equal('hello', $conn->query('SELECT %s', 'hello')->fetchSingle());
|
||||
});
|
||||
|
||||
|
||||
test(function () use ($config) {
|
||||
Assert::exception(function () use ($config) {
|
||||
new Connection($config + ['onConnect' => '']);
|
||||
|
Reference in New Issue
Block a user