/**
* @group disconnected
*/
public function testCanAssignConnectionsToCustomSlotsFromParameters()
{
$connection1 = $this->getMockConnection('tcp://127.0.0.1:6379?slots=0-5460');
$connection2 = $this->getMockConnection('tcp://127.0.0.1:6380?slots=5461-10921');
$connection3 = $this->getMockConnection('tcp://127.0.0.1:6381?slots=10922-16383');
$cluster = new RedisCluster(new Connection\Factory());
$cluster->add($connection1);
$cluster->add($connection2);
$cluster->add($connection3);
$expectedMap = array_merge(array_fill(0, 5461, '127.0.0.1:6379'), array_fill(5460, 5461, '127.0.0.1:6380'), array_fill(10921, 5462, '127.0.0.1:6381'));
$cluster->buildSlotsMap();
$this->assertSame($expectedMap, $cluster->getSlotsMap());
}