getCommand(); $command->setArguments($arguments); $this->assertSame($expected, $command->getArguments()); } /** * @group disconnected */ public function testParseResponse(): void { $this->assertSame(1, $this->getCommand()->parseResponse(1)); } /** * @group connected * @return void * @requiresRedisVersion >= 7.0.0 */ public function testReturnsCorrectKeyExpirationTime(): void { $expirationTime = (int) microtime(true) + 100000; $redis = $this->getClient(); $redis->set('key', 'value'); $redis->set('key1', 'value'); $redis->expireat('key', $expirationTime); $this->assertSame($expirationTime, $redis->expiretime('key')); $this->assertSame(-1, $redis->expiretime('key1')); $this->assertSame(-2, $redis->expiretime('non-existing key')); } }