Elgg\Database\ConfigTest::testGetConnectionConfigWithSingleWriteOldStyle PHP Method

testGetConnectionConfigWithSingleWriteOldStyle() public method

Elgg < 1.9 used objects to store the config
    public function testGetConnectionConfigWithSingleWriteOldStyle()
    {
        $ans = array('host' => 'foo', 'user' => 'user', 'password' => 'xxxx', 'database' => 'elgg');
        $CONFIG = new \stdClass();
        $CONFIG->db['write'] = 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));
    }