public function connect()
{
foreach ($this->pool as $connection) {
$connection->connect();
}
}
/** * @group disconnected */ public function testConnectForcesAllConnectionsToConnect() { $connection1 = $this->getMockConnection(); $connection1->expects($this->once())->method('connect'); $connection2 = $this->getMockConnection(); $connection2->expects($this->once())->method('connect'); $cluster = new PredisCluster(); $cluster->add($connection1); $cluster->add($connection2); $cluster->connect(); }