/** * @group disconnected */ public function testReadsCommandFromCorrectConnection() { $command = Profile\Factory::getDefault()->createCommand('get', array('node02:3212')); $connection1 = $this->getMockConnection('tcp://host1:7001'); $connection1->expects($this->never())->method('readResponse'); $connection2 = $this->getMockConnection('tcp://host1:7002'); $connection2->expects($this->once())->method('readResponse')->with($command); $cluster = new PredisCluster(); $cluster->add($connection1); $cluster->add($connection2); $cluster->readResponse($command); }