Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit ce06865

Browse files
committed
added failure tests
1 parent 0a9b7c8 commit ce06865

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/ZendDiagnosticsTest/ChecksTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,21 @@ public function testRabbitMQ()
5050
$check = new RabbitMQ();
5151
$result = $check->check();
5252
$this->assertInstanceOf('ZendDiagnostics\Result\Success', $result);
53+
54+
$check = new RabbitMQ('127.0.0.250', 9999);
55+
$this->setExpectedException('PhpAmqpLib\Exception\AMQPRuntimeException');
56+
$check->check();
5357
}
5458

5559
public function testRedis()
5660
{
5761
$check = new Redis();
5862
$result = $check->check();
5963
$this->assertInstanceOf('ZendDiagnostics\Result\Success', $result);
64+
65+
$check = new Redis('127.0.0.250', 9999);
66+
$this->setExpectedException('Predis\Connection\ConnectionException');
67+
$check->check();
6068
}
6169

6270
public function testClassExists()

0 commit comments

Comments
 (0)