mirror of
https://github.com/predis/predis.git
synced 2026-10-10 05:47:02 +00:00
Disable CLIENT SETINFO calls by default (#1399)
Add `client_info` parameter
This commit is contained in:
@@ -1258,12 +1258,27 @@ class ClientTest extends PredisTestCase
|
||||
* @group relay-incompatible
|
||||
* @requiresRedisVersion >= 7.2.0
|
||||
*/
|
||||
public function testSetClientInfoOnConnection(): void
|
||||
public function testDoNoSetClientInfoOnConnection(): void
|
||||
{
|
||||
$client = new Client($this->getParameters());
|
||||
$libName = $client->client('LIST')[0]['lib-name'];
|
||||
$libVer = $client->client('LIST')[0]['lib-ver'];
|
||||
|
||||
$this->assertEmpty($libName);
|
||||
$this->assertEmpty($libVer);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group connected
|
||||
* @group relay-incompatible
|
||||
* @requiresRedisVersion >= 7.2.0
|
||||
*/
|
||||
public function testSetClientInfoOnConnectionWhenEnabled(): void
|
||||
{
|
||||
$client = new Client($this->getParameters(['client_info' => true]));
|
||||
$libName = $client->client('LIST')[0]['lib-name'];
|
||||
$libVer = $client->client('LIST')[0]['lib-ver'];
|
||||
|
||||
$this->assertSame('predis', $libName);
|
||||
$this->assertSame(Client::VERSION, $libVer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user