getCommand(); $command->setArguments($actualArguments); $this->assertSameValues($expectedArguments, $command->getArguments()); } /** * @group disconnected */ public function testParseResponse(): void { $this->assertSame(1, $this->getCommand()->parseResponse(1)); } /** * @group connected * @group relay-resp3 * @return void * @requiresRediSearchVersion >= 1.0.0 */ public function testAddSuggestionStringIntoAutoCompleteDictionary(): void { $redis = $this->getClient(); $this->assertSame(1, $redis->ftsugadd('key', 'string', 1)); } /** * @group connected * @return void * @requiresRediSearchVersion >= 2.8.0 */ public function testAddSuggestionStringIntoAutoCompleteDictionaryResp3(): void { $redis = $this->getResp3Client(); $this->assertSame(1, $redis->ftsugadd('key', 'string', 1)); } public function argumentsProvider(): array { return [ 'with default arguments' => [ ['key', 'string', 1], ['key', 'string', 1], ], 'with INCR modifier' => [ ['key', 'string', 1, (new SugAddArguments())->incr()], ['key', 'string', 1, 'INCR'], ], 'with PAYLOAD' => [ ['key', 'string', 1, (new SugAddArguments())->payload('payload')], ['key', 'string', 1, 'PAYLOAD', 'payload'], ], 'with all arguments' => [ ['key', 'string', 1, (new SugAddArguments())->incr()->payload('payload')], ['key', 'string', 1, 'INCR', 'PAYLOAD', 'payload'], ], ]; } }