Added support for command metrics group

This commit is contained in:
vladvildanov
2026-11-24 17:03:38 +02:00
committed by GitHub
parent c99f80e328
commit 716bef4fa7
11 changed files with 803 additions and 4 deletions
@@ -783,6 +783,25 @@ class StreamConnectionTest extends PredisConnectionTestCase
// ---- INTEGRATION TESTS --------------------------------------------- //
// ******************************************************************** //
/**
* @group connected
*/
public function testGetPeerNameReturnsAddressOfLastConnectedServer(): void
{
$connection = $this->createConnection();
$this->assertNull($connection->getPeerName());
$connection->connect();
$peerName = $connection->getPeerName();
$this->assertStringEndsWith(':' . constant('REDIS_SERVER_PORT'), $peerName);
$connection->disconnect();
$this->assertSame($peerName, $connection->getPeerName());
}
/**
* @group connected
* @requires PHP 5.4