Rename ComposableProtocolProcessor to CompositeProtocolProcessor.

This commit is contained in:
Daniele Alessandri
2014-06-03 15:45:07 +02:00
parent abd284c972
commit 1fd113c570
4 changed files with 11 additions and 11 deletions
@@ -18,13 +18,13 @@ use Predis\Protocol\RequestSerializerInterface;
use Predis\Protocol\ResponseReaderInterface;
/**
* Composable protocol processor for the standard Redis wire protocol using
* Composite protocol processor for the standard Redis wire protocol using
* pluggable handlers to serialize requests and deserialize responses.
*
* @link http://redis.io/topics/protocol
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
class ComposableProtocolProcessor implements ProtocolProcessorInterface
class CompositeProtocolProcessor implements ProtocolProcessorInterface
{
protected $serializer;
protected $reader;
@@ -16,14 +16,14 @@ use PredisTestCase;
/**
*
*/
class ComposableProtocolProcessorTest extends PredisTestCase
class CompositeProtocolProcessorTest extends PredisTestCase
{
/**
* @group disconnected
*/
public function testConstructor()
{
$protocol = new ComposableProtocolProcessor();
$protocol = new CompositeProtocolProcessor();
$this->assertInstanceOf(
'Predis\Protocol\Text\RequestSerializer', $protocol->getRequestSerializer()
@@ -41,7 +41,7 @@ class ComposableProtocolProcessorTest extends PredisTestCase
$serializer = $this->getMock('Predis\Protocol\RequestSerializerInterface');
$reader = $this->getMock('Predis\Protocol\ResponseReaderInterface');
$protocol = new ComposableProtocolProcessor($serializer, $reader);
$protocol = new CompositeProtocolProcessor($serializer, $reader);
$this->assertSame($serializer, $protocol->getRequestSerializer());
$this->assertSame($reader, $protocol->getResponseReader());
@@ -54,7 +54,7 @@ class ComposableProtocolProcessorTest extends PredisTestCase
{
$serializer = $this->getMock('Predis\Protocol\RequestSerializerInterface');
$protocol = new ComposableProtocolProcessor();
$protocol = new CompositeProtocolProcessor();
$protocol->setRequestSerializer($serializer);
$this->assertSame($serializer, $protocol->getRequestSerializer());
@@ -67,7 +67,7 @@ class ComposableProtocolProcessorTest extends PredisTestCase
{
$reader = $this->getMock('Predis\Protocol\ResponseReaderInterface');
$protocol = new ComposableProtocolProcessor();
$protocol = new CompositeProtocolProcessor();
$protocol->setResponseReader($reader);
$this->assertSame($reader, $protocol->getResponseReader());
@@ -84,7 +84,7 @@ class ComposableProtocolProcessorTest extends PredisTestCase
$connection = $this->getMock('Predis\Connection\CompositeConnectionInterface');
$serializer = $this->getMock('Predis\Protocol\RequestSerializerInterface');
$protocol = new ComposableProtocolProcessor($serializer);
$protocol = new CompositeProtocolProcessor($serializer);
$connection->expects($this->once())
->method('writeBuffer')
@@ -108,7 +108,7 @@ class ComposableProtocolProcessorTest extends PredisTestCase
$connection = $this->getMock('Predis\Connection\CompositeConnectionInterface');
$reader = $this->getMock('Predis\Protocol\ResponseReaderInterface');
$protocol = new ComposableProtocolProcessor(null, $reader);
$protocol = new CompositeProtocolProcessor(null, $reader);
$reader->expects($this->once())
->method('read')
@@ -29,7 +29,7 @@ class MultiBulkResponseTest extends PredisTestCase
$connection->expects($this->once())
->method('getProtocol')
->will($this->returnValue(new ComposableProtocolProcessor()));
->will($this->returnValue(new CompositeProtocolProcessor()));
$connection->expects($this->at(1))
->method('readLine')
@@ -54,7 +54,7 @@ class ResponseReaderTest extends PredisTestCase
{
$reader = new ResponseReader();
$protocol = new ComposableProtocolProcessor();
$protocol = new CompositeProtocolProcessor();
$protocol->setResponseReader($reader);
$connection = $this->getMock('Predis\Connection\CompositeConnectionInterface');