[tests] Change indentation of mock method expectations.

This commit is contained in:
Daniele Alessandri
2016-06-09 17:26:49 +02:00
parent f02f3b6d37
commit eb1e686ff9
49 changed files with 3288 additions and 2382 deletions
@@ -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);
}