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.2.0 */ public function testDumpReturnsContentOfSynonymGroupFromGivenIndex(): void { $redis = $this->getClient(); $expectedResponse = ['term1', ['synonym1'], 'term2', ['synonym1']]; $this->assertEquals( 'OK', $redis->ftcreate('index', [new TextField('text_field')]) ); $this->assertEquals( 'OK', $redis->ftsynupdate('index', 'synonym1', null, 'term1', 'term2') ); $this->assertSame($expectedResponse, $redis->ftsyndump('index')); } /** * @group connected * @return void * @requiresRediSearchVersion >= 1.2.0 */ public function testThrowsExceptionOnNonExistingIndex(): void { $redis = $this->getClient(); $this->expectException(ServerException::class); $redis->ftsyndump('index'); } }