public function __construct(array $configs)
 {
     foreach ($configs as $name => $config) {
         $check = new RabbitMQ($config['host'], $config['port'], $config['user'], $config['password'], $config['vhost']);
         $check->setLabel(sprintf('Rabbit MQ "%s"', $name));
         $this->checks[sprintf('rabbit_mq_%s', $name)] = $check;
     }
 }
예제 #2
0
 public function testRabbitMQ()
 {
     $check = new RabbitMQ();
     $result = $check->check();
     $this->assertInstanceOf('ZendDiagnostics\\Result\\Success', $result);
     $check = new RabbitMQ('127.0.0.250', 9999);
     $this->setExpectedException('PhpAmqpLib\\Exception\\AMQPRuntimeException');
     $check->check();
 }