mirror of
https://github.com/predis/predis.git
synced 2026-10-14 16:02:50 +00:00
[tests] Replace deprecated TestCase::at().
The "at" matcher will be removed in PHPUnit 10 but it is not a bad thing after all because it was cumbersome and error-prone. Took the opportunity to improve some tests while converting them.
This commit is contained in:
@@ -27,23 +27,23 @@ class MultiBulkResponseTest extends PredisTestCase
|
||||
$connection
|
||||
->expects($this->once())
|
||||
->method('getProtocol')
|
||||
->willReturn(new CompositeProtocolProcessor());
|
||||
->willReturn(
|
||||
new CompositeProtocolProcessor()
|
||||
);
|
||||
$connection
|
||||
->expects($this->at(1))
|
||||
->expects($this->exactly(2))
|
||||
->method('readLine')
|
||||
->willReturn('$3');
|
||||
->willReturnOnConsecutiveCalls(
|
||||
'$3',
|
||||
'$3'
|
||||
);
|
||||
$connection
|
||||
->expects($this->at(2))
|
||||
->expects($this->exactly(2))
|
||||
->method('readBuffer')
|
||||
->willReturn("foo\r\n");
|
||||
$connection
|
||||
->expects($this->at(3))
|
||||
->method('readLine')
|
||||
->willReturn('$3');
|
||||
$connection
|
||||
->expects($this->at(4))
|
||||
->method('readBuffer')
|
||||
->willReturn("bar\r\n");
|
||||
->willReturnOnConsecutiveCalls(
|
||||
"foo\r\n",
|
||||
"bar\r\n"
|
||||
);
|
||||
|
||||
$handler = new Handler\MultiBulkResponse();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user