mirror of
https://github.com/predis/predis.git
synced 2026-08-30 04:02:22 +00:00
Rename ComposableProtocolProcessor to CompositeProtocolProcessor.
This commit is contained in:
+2
-2
@@ -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;
|
||||
+7
-7
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user