public function testIsDatabaseSplitInSettings() { $CONFIG = new stdClass(); $CONFIG->db['split'] = true; $conf = new Elgg_Database_Config($CONFIG); $this->assertTrue($conf->isDatabaseSplit()); }
/** * Establish database connections * * If the configuration has been set up for multiple read/write databases, set those * links up separately; otherwise just create the one database link. * * @return void * @throws DatabaseException */ public function setupConnections() { if ($this->config->isDatabaseSplit()) { $this->establishLink('read'); $this->establishLink('write'); } else { $this->establishLink('readwrite'); } }