Skip to content

Commit 43ca704

Browse files
committed
test: Assert that 3 exceptions are thrown in invalid connection test
1 parent 779c74b commit 43ca704

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/Integration/ClientIntegrationTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,21 +279,27 @@ public function testInvalidConnectionCheck(): void
279279
->withDriver('http', 'http://localboast')
280280
->build();
281281

282+
$exceptionThrownCount = 0;
282283
try {
283-
self::assertFalse($client->verifyConnectivity('bolt'));
284+
$client->verifyConnectivity('bolt');
285+
++$exceptionThrownCount;
284286
} catch (Exception $e) {
285287
self::assertInstanceOf(RuntimeException::class, $e);
286288
}
287289
try {
288-
self::assertFalse($client->verifyConnectivity('neo4j'));
290+
$client->verifyConnectivity('neo4j');
291+
++$exceptionThrownCount;
289292
} catch (Exception $e) {
290293
self::assertInstanceOf(RuntimeException::class, $e);
291294
}
292295
try {
293-
self::assertFalse($client->verifyConnectivity('http'));
296+
$client->verifyConnectivity('http');
297+
++$exceptionThrownCount;
294298
} catch (Exception $e) {
295299
self::assertInstanceOf(RuntimeException::class, $e);
296300
}
301+
302+
self::assertEquals(3, $exceptionThrownCount);
297303
}
298304

299305
public function testValidConnectionCheck(): void

0 commit comments

Comments
 (0)