/**
  * @group disconnected
  */
 public function testAddingConnectionsToReplication()
 {
     $master = $this->getMockConnection('tcp://host1?alias=master');
     $slave1 = $this->getMockConnection('tcp://host2?alias=slave1');
     $slave2 = $this->getMockConnection('tcp://host3?alias=slave2');
     $replication = new MasterSlaveReplication();
     $replication->add($master);
     $replication->add($slave1);
     $replication->add($slave2);
     $this->assertSame($master, $replication->getConnectionById('master'));
     $this->assertSame($slave1, $replication->getConnectionById('slave1'));
     $this->assertSame($slave2, $replication->getConnectionById('slave2'));
     $this->assertSame($master, $replication->getMaster());
     $this->assertSame(array($slave1, $slave2), $replication->getSlaves());
 }