/**
* @group disconnected
*/
public function testExecuteCommandOnEachNode()
{
$ping = Profile\Factory::getDefault()->createCommand('ping', array());
$connection1 = $this->getMock('Predis\\Connection\\NodeConnectionInterface');
$connection1->expects($this->once())->method('executeCommand')->with($ping)->will($this->returnValue(true));
$connection2 = $this->getMock('Predis\\Connection\\NodeConnectionInterface');
$connection2->expects($this->once())->method('executeCommand')->with($ping)->will($this->returnValue(false));
$cluster = new PredisCluster();
$cluster->add($connection1);
$cluster->add($connection2);
$this->assertSame(array(true, false), $cluster->executeCommandOnNodes($ping));
}