/** * Prepare runtime context - tell DB class that current DB is CUBRID */ protected function setUp() { $oContext =& Context::getInstance(); $db_info->master_db = array('db_type' => 'cubrid', 'db_table_prefix' => 'xe_'); $db_info->slave_db = array(array('db_type' => 'cubrid', 'db_table_prefix' => 'xe_')); $oContext->setDbInfo($db_info); $db = new MockDb(); $db->getParser(true); }
function &getParser($force = false) { static $dbParser = null; if (!$dbParser || $force) { $oDB =& MockDb::getInstance(); $dbParser = $oDB->getParser(); DB::getParser(true); } return $dbParser; }