public function testGetConnectionConfigWithMultipleReadOldStyle()
{
$ans = array(0 => array('host' => 0, 'user' => 'user0', 'password' => 'xxxx0', 'database' => 'elgg0'), 1 => array('host' => 1, 'user' => 'user1', 'password' => 'xxxx1', 'database' => 'elgg1'));
$CONFIG = new \stdClass();
$CONFIG->db['read'][0] = new \stdClass();
$CONFIG->db['read'][0]->dbhost = $ans[0]['host'];
$CONFIG->db['read'][0]->dbuser = $ans[0]['user'];
$CONFIG->db['read'][0]->dbpass = $ans[0]['password'];
$CONFIG->db['read'][0]->dbname = $ans[0]['database'];
$CONFIG->db['read'][1] = new \stdClass();
$CONFIG->db['read'][1]->dbhost = $ans[1]['host'];
$CONFIG->db['read'][1]->dbuser = $ans[1]['user'];
$CONFIG->db['read'][1]->dbpass = $ans[1]['password'];
$CONFIG->db['read'][1]->dbname = $ans[1]['database'];
$conf = new \Elgg\Database\Config($CONFIG);
$connConf = $conf->getConnectionConfig(\Elgg\Database\Config::READ);
$this->assertEquals($ans[$connConf['host']], $connConf);
}