/** * Load and initialize the database. * * @return Omeka_Db */ public function init() { $db = $this->getDb(); $helper = Omeka_Test_Helper_Db::factory($this); if (self::$dropTables) { $helper->dropTables(); self::$dropTables = false; } if (self::$runInstaller) { if (!self::$dropTables) { $helper->truncateTables(); } $helper->install(); self::$runInstaller = false; } $db->beginTransaction(); return $db; }