Пример #1
0
 public function testQueue()
 {
     $client = new Client();
     $client->connect();
     $channel = null;
     try {
         $channel = $client->channel();
         $channel->queueDeclare("test_queue", true, true);
         $this->fail("queue should not exist.");
     } catch (ClientException $e) {
         $client->removeChannel($channel->getChannelId());
     }
     $this->runWithConfig(__DIR__ . "/../Fixtures/queue.yml");
     try {
         $channel = $client->channel();
         $channel->queueDeclare("test_queue", true, true);
         $channel->queueDelete("test_queue");
     } catch (ClientException $e) {
         $this->fail("queue should exist by now.");
     }
 }