本文整理匯總了PHP中CakeTestCase::_initDb方法的典型用法代碼示例。如果您正苦於以下問題:PHP CakeTestCase::_initDb方法的具體用法?PHP CakeTestCase::_initDb怎麽用?PHP CakeTestCase::_initDb使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CakeTestCase
的用法示例。
在下文中一共展示了CakeTestCase::_initDb方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _initDb
/**
* @brief call only when its not set
*
* overload the _initDb method and make sure its only called when the db
* object does not exist
*
* @access public
*
* @return true
*/
public function _initDb()
{
if (!isset($this->db) || !$this->db) {
parent::_initDb();
}
return true;
}
示例2: array
function _initDb()
{
parent::_initDb();
$exclude = array();
if (isset($this->fixtures['EXCLUDE'])) {
$exclude = $this->fixtures['EXCLUDE'];
unset($this->fixtures['EXCLUDE']);
}
if (isset($this->fixtures['IMPORT'])) {
$from = $this->fixtures['IMPORT'];
unset($this->fixtures['IMPORT']);
$this->_importTables($from);
}
$this->fixtures = array_diff(array_unique($this->fixtures), $exclude);
}