mirror of
https://github.com/predis/predis.git
synced 2026-10-10 13:57:22 +00:00
[tests] Change indentation of mock method expectations.
This commit is contained in:
@@ -27,20 +27,20 @@ class ProtocolProcessorTest extends PredisTestCase
|
||||
$protocol = new ProtocolProcessor();
|
||||
|
||||
$command = $this->getMock('Predis\Command\CommandInterface');
|
||||
|
||||
$command->expects($this->once())
|
||||
->method('getId')
|
||||
->will($this->returnValue('PING'));
|
||||
|
||||
$command->expects($this->once())
|
||||
->method('getArguments')
|
||||
->will($this->returnValue(array()));
|
||||
$command
|
||||
->expects($this->once())
|
||||
->method('getId')
|
||||
->will($this->returnValue('PING'));
|
||||
$command
|
||||
->expects($this->once())
|
||||
->method('getArguments')
|
||||
->will($this->returnValue(array()));
|
||||
|
||||
$connection = $this->getMockConnectionOfType('Predis\Connection\CompositeConnectionInterface');
|
||||
|
||||
$connection->expects($this->once())
|
||||
->method('writeBuffer')
|
||||
->with($this->equalTo($serialized));
|
||||
$connection
|
||||
->expects($this->once())
|
||||
->method('writeBuffer')
|
||||
->with($this->equalTo($serialized));
|
||||
|
||||
$protocol->write($connection, $command);
|
||||
}
|
||||
@@ -53,26 +53,26 @@ class ProtocolProcessorTest extends PredisTestCase
|
||||
$protocol = new ProtocolProcessor();
|
||||
|
||||
$connection = $this->getMockConnectionOfType('Predis\Connection\CompositeConnectionInterface');
|
||||
|
||||
$connection->expects($this->at(0))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('+OK'));
|
||||
|
||||
$connection->expects($this->at(1))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('-ERR error message'));
|
||||
|
||||
$connection->expects($this->at(2))
|
||||
->method('readLine')
|
||||
->will($this->returnValue(':2'));
|
||||
|
||||
$connection->expects($this->at(3))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('$-1'));
|
||||
|
||||
$connection->expects($this->at(4))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('*-1'));
|
||||
$connection
|
||||
->expects($this->at(0))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('+OK'));
|
||||
$connection
|
||||
->expects($this->at(1))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('-ERR error message'));
|
||||
$connection
|
||||
->expects($this->at(2))
|
||||
->method('readLine')
|
||||
->will($this->returnValue(':2'));
|
||||
$connection
|
||||
->expects($this->at(3))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('$-1'));
|
||||
$connection
|
||||
->expects($this->at(4))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('*-1'));
|
||||
|
||||
$this->assertEquals('OK', $protocol->read($connection));
|
||||
$this->assertEquals('ERR error message', $protocol->read($connection));
|
||||
@@ -90,10 +90,10 @@ class ProtocolProcessorTest extends PredisTestCase
|
||||
$protocol->useIterableMultibulk(true);
|
||||
|
||||
$connection = $this->getMockConnectionOfType('Predis\Connection\CompositeConnectionInterface');
|
||||
|
||||
$connection->expects($this->once(4))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('*1'));
|
||||
$connection
|
||||
->expects($this->once(4))
|
||||
->method('readLine')
|
||||
->will($this->returnValue('*1'));
|
||||
|
||||
$this->assertInstanceOf('Predis\Response\Iterator\MultiBulk', $protocol->read($connection));
|
||||
}
|
||||
@@ -108,10 +108,10 @@ class ProtocolProcessorTest extends PredisTestCase
|
||||
$protocol = new ProtocolProcessor();
|
||||
|
||||
$connection = $this->getMockConnectionOfType('Predis\Connection\CompositeConnectionInterface', 'tcp://127.0.0.1:6379');
|
||||
|
||||
$connection->expects($this->once())
|
||||
->method('readLine')
|
||||
->will($this->returnValue('!'));
|
||||
$connection
|
||||
->expects($this->once())
|
||||
->method('readLine')
|
||||
->will($this->returnValue('!'));
|
||||
|
||||
$protocol->read($connection);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user