Example #1
0
 /**
  * @expectedException RuntimeException
  */
 public function testWriteInvalidStream()
 {
     $this->stream = fopen('php://temp', 'rb');
     //read-only mode
     $this->obj->writeTo($this->stream);
     $this->fail('the above call should throw an exception');
 }
Example #2
0
 /**
  * Send the request
  * 
  * @param Kafka_FetchRequest $req Request
  * 
  * @return void
  */
 protected function sendRequest(Kafka_FetchRequest $req)
 {
     $send = new Kafka_BoundedByteBuffer_Send($req);
     $send->writeCompletely($this->conn);
 }