fetchResponse() public method

decode fetch response
public fetchResponse ( ) : Iterator
return Iterator
Example #1
0
 /**
  * testFetchRequest
  *
  * @access public
  * @return void
  */
 public function testFetchRequest()
 {
     $this->setData(Decoder::Khex2bin('0000007200000000000000010004746573740000000100000000000000000000000000630000004e000000000000006100000020d4091dc7000000000000000000123332333231603160606060606060606060600000000000000062000000166338ddac000000000000000000086d65737361676532'));
     $decoder = new \Kafka\Protocol\Decoder($this->stream);
     $actual = $decoder->fetchResponse();
     $this->assertInstanceOf('\\Kafka\\Protocol\\Fetch\\Topic', $actual);
     $this->assertEquals(1, count($actual));
 }