示例#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['receipt'] = $receipt;
     $this->connection->writeFrame($stompFrame);
     return $this->waitForReceipt($receipt);
 }
示例#2
0
 /**
  * @expectedException \Stomp\Exception\StompException
  */
 public function testWriteFrameThrowsExceptionIfNotConnected()
 {
     $connection = new Connection('tcp://localhost');
     $connection->writeFrame(new Frame());
 }