mirror of
https://github.com/predis/predis.git
synced 2026-08-18 06:21:46 +00:00
Add AUTH command to Relay connection tests (#1601)
This commit is contained in:
committed by
GitHub
parent
f26a13c8f4
commit
62f4ebcc37
@@ -472,7 +472,9 @@ class RelayConnectionTest extends PredisTestCase
|
||||
*/
|
||||
public function testExecutesCommand(): void
|
||||
{
|
||||
$connection = new RelayConnection(new Parameters(), new Relay());
|
||||
$parameters = $this->getParameters();
|
||||
$connection = new RelayConnection($parameters, new Relay());
|
||||
$connection->executeCommand(new RawCommand('AUTH', [$parameters->password]));
|
||||
|
||||
$this->assertEquals(
|
||||
'OK',
|
||||
@@ -491,7 +493,9 @@ class RelayConnectionTest extends PredisTestCase
|
||||
*/
|
||||
public function testConnectWithOnConnectionCommands(): void
|
||||
{
|
||||
$connection = new RelayConnection(new Parameters(), new Relay());
|
||||
$parameters = $this->getParameters();
|
||||
$connection = new RelayConnection($parameters, new Relay());
|
||||
$connection->addConnectCommand(new RawCommand('AUTH', [$parameters->password]));
|
||||
$connection->addConnectCommand(new RawCommand('CLIENT', ['SETNAME', 'predis']));
|
||||
|
||||
$connection->connect();
|
||||
|
||||
Reference in New Issue
Block a user