Author: Daniele Alessandri (suppakilla@gmail.com)
Inheritance: implements Predis\Protocol\ProtocolProcessorInterface
 /**
  * @group disconnected
  * @expectedException \Predis\Protocol\ProtocolException
  * @expectedExceptionMessage Unknown response prefix: '!'.
  */
 public function testUnknownResponsePrefix()
 {
     $protocol = new ProtocolProcessor();
     $connection = $this->getMock('Predis\\Connection\\CompositeConnectionInterface');
     $connection->expects($this->once())->method('readLine')->will($this->returnValue('!'));
     $protocol->read($connection);
 }
 /**
  * Returns a new client instance.
  *
  * @return Client
  */
 protected function getClient()
 {
     $parameters = $this->getParameters(array('read_write_timeout' => 2));
     $protocol = new TextProtocolProcessor();
     $protocol->useIterableMultibulk(true);
     $connection = new CompositeStreamConnection($parameters, $protocol);
     $client = new Client($connection);
     $client->connect();
     $client->flushdb();
     return $client;
 }