mirror of
https://github.com/predis/predis.git
synced 2026-10-09 05:16:32 +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:
@@ -304,15 +304,14 @@ class FactoryTest extends PredisTestCase
|
||||
->method('getParameters')
|
||||
->willReturn($parameters);
|
||||
$connection
|
||||
->expects($this->at(1))
|
||||
->expects($this->exactly(2))
|
||||
->method('addConnectCommand')
|
||||
->with($this->isRedisCommand('AUTH', array('foobar')));
|
||||
$connection
|
||||
->expects($this->at(2))
|
||||
->method('addConnectCommand')
|
||||
->with($this->isRedisCommand('SELECT', array(0)));
|
||||
->withConsecutive(
|
||||
array($this->isRedisCommand('AUTH', array('foobar'))),
|
||||
array($this->isRedisCommand('SELECT', array('0')))
|
||||
);
|
||||
|
||||
$factory = new Factory();
|
||||
$factory = new Factory();
|
||||
|
||||
// TODO: using reflection to make a protected method accessible :facepalm:
|
||||
$reflection = new \ReflectionObject($factory);
|
||||
|
||||
Reference in New Issue
Block a user