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 testRemovesAliasFromGivenIndex(): void { $redis = $this->getClient(); $schema = [new TextField('text_field')]; $this->assertEquals('OK', $redis->ftcreate('index', $schema)); $this->assertEquals('OK', $redis->ftaliasadd('alias', 'index')); $this->assertEquals('OK', $redis->ftaliasdel('alias')); } /** * @group connected * @return void * @requiresRediSearchVersion >= 1.0.0 */ public function testThrowsExceptionOnNonExistingAlias(): void { $redis = $this->getClient(); $this->expectException(ServerException::class); $this->expectExceptionMessage('Alias does not exist'); $redis->ftaliasdel('alias'); } }