public function testGetConnectionConfigWithSingleWrite()
{
$ans = array('host' => 'foo', 'user' => 'user', 'password' => 'xxxx', 'database' => 'elgg');
$CONFIG = new \stdClass();
$CONFIG->db['write']['dbhost'] = $ans['host'];
$CONFIG->db['write']['dbuser'] = $ans['user'];
$CONFIG->db['write']['dbpass'] = $ans['password'];
$CONFIG->db['write']['dbname'] = $ans['database'];
$conf = new \Elgg\Database\Config($CONFIG);
$this->assertEquals($ans, $conf->getConnectionConfig(\Elgg\Database\Config::WRITE));
}