Esempio n. 1
0
 public function testDestruct()
 {
     $this->channelMock->expects($this->once())->method('close');
     $this->clientMock->expects($this->once())->method('close');
     $queue = new MessageQueue($this->clientMock);
     unset($queue);
 }
 /**
  * Test closing the connection - should close the connection as well as the
  * channel
  */
 public function testCloseConnection()
 {
     $this->connection->expects($this->once())->method('close')->will($this->returnValue(true));
     $this->channel->expects($this->once())->method('close')->will($this->returnValue(true));
     $this->amqpApi->closeConnection();
 }