mirror of
https://github.com/predis/predis.git
synced 2026-10-08 04:46:38 +00:00
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:
committed by
GitHub
parent
e9431f788d
commit
d18e20c98f
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user