Esempio n. 1
0
 /**
  * @expectedException Riak\Client\RiakException
  * @expectedExceptionMessage Unexpected protobuf response code: 999
  */
 public function testReceiveInvalidMessageException()
 {
     $stream = $this->getMock('Riak\\Client\\Core\\Transport\\Proto\\ProtoStream', [], [], '', false);
     $messageCode = 10;
     $this->connection->expects($this->once())->method('receive')->willReturn([999, null])->with($this->equalTo($stream));
     $this->instance->receiveMessage($stream, $messageCode);
 }
 /**
  * @return \DrSlump\Protobuf\Message
  */
 protected function readNext()
 {
     return $this->client->receiveMessage($this->stream, $this->messageCode);
 }