getCommand(); $command->setArguments($actualArguments); $this->assertSameValues($expectedArguments, $command->getArguments()); } /** * @group disconnected */ public function testParseResponse(): void { $this->assertSame(1, $this->getCommand()->parseResponse(1)); } /** * @group connected * @return void * @requiresRedisVersion >= 6.2.0 */ public function testPerformFailoverOfConnectedReplica(): void { $this->markTestSkipped('Test requires configured replica node connected to master'); } /** * @group connected * @return void * @requiresRedisVersion >= 6.2.0 */ public function testThrowsExceptionOnUnexpectedValueGiven(): void { $redis = $this->getClient(); $this->expectException(UnexpectedValueException::class); $this->expectExceptionMessage('Wrong timeout argument value or position offset'); $redis->failover(null, false, 0); } public function argumentsProvider(): array { return [ 'without optional arguments - no arguments' => [ [], [], ], 'without optional arguments - default arguments' => [ [null, false, -1], [], ], 'with TO argument - no FORCE' => [ [new To('test', 9999)], ['TO', 'test', 9999], ], 'with TO argument - with FORCE' => [ [new To('test', 9999, true)], ['TO', 'test', 9999, 'FORCE'], ], 'with ABORT modifier' => [ [null, true], ['ABORT'], ], 'with TIMEOUT argument' => [ [null, false, 10], ['TIMEOUT', 10], ], 'with all arguments' => [ [new To('test', 9999, true), true, 10], ['TO', 'test', 9999, 'FORCE', 'ABORT', 'TIMEOUT', 10], ], ]; } }