Example #1
0
 /**
  * Write frame to server and expect an matching receipt frame
  *
  * @param Frame $stompFrame
  * @return bool
  */
 protected function sendFrameExpectingReceipt(Frame $stompFrame)
 {
     $receipt = md5(microtime());
     $stompFrame->setHeader('receipt', $receipt);
     $this->connection->writeFrame($stompFrame);
     return $this->waitForReceipt($receipt);
 }
 /**
  * @expectedException \Stomp\Exception\StompException
  */
 public function testWriteFrameThrowsExceptionIfNotConnected()
 {
     $connection = new Connection('tcp://localhost');
     $connection->writeFrame(new Frame());
 }