mirror of
https://github.com/predis/predis.git
synced 2026-11-28 15:12:30 +00:00
Added support for command metrics group
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user