getClient(); $this->assertEquals('OK', $redis->config('set', 'appendonly', 'yes')); } /** * {@inheritDoc} */ protected function getExpectedCommand(): string { return WAITAOF::class; } /** * {@inheritDoc} */ protected function getExpectedId(): string { return 'WAITAOF'; } /** * @group disconnected */ public function testFilterArguments(): void { $actualArguments = $expectedArguments = [1, 2, 3]; $command = $this->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 >= 7.2.0 */ public function testReturnQuantityOfSyncedAOFInstances(): void { $redis = $this->getClient(); $this->assertEquals('OK', $redis->set('foo', 'bar')); $this->assertSame([1, 0], $redis->waitaof(1, 0, 0)); } protected function tearDown(): void { $redis = $this->getClient(); $this->assertEquals('OK', $redis->config('set', 'appendonly', 'no')); } }