Added RESP3 protocol option, establish RESP3 connection (#1267)

* Added RESP3 protocol option, establish RESP3 connection

* Removed method from the interface
This commit is contained in:
Vladyslav Vildanov
2023-05-05 11:52:11 +03:00
committed by GitHub
parent e9431f788d
commit d18e20c98f
7 changed files with 51 additions and 0 deletions
@@ -195,4 +195,21 @@ class StreamConnectionTest extends PredisConnectionTestCase
$this->assertArrayHasKey('tcp_nodelay', $options['socket']);
$this->assertFalse($options['socket']['tcp_nodelay']);
}
/**
* @group disconnected
* @return void
*/
public function testGetInitCommandsReturnsGivenInitCommands(): void
{
$command = new RawCommand('HELLO', [3]);
$connection = $this->createConnection();
$connection->addConnectCommand($command);
$initCommands = $connection->getInitCommands();
$this->assertInstanceOf(RawCommand::class, $initCommands[0]);
$this->assertSame('HELLO', $initCommands[0]->getId());
}
}