コード例 #1
0
function getTestsBasePath()
{
    return realpath(dirname(__FILE__) . '/../');
}
require_once 'test_utils.php';
// Generic utility method file.
require_once OX_BASE_PATH . 'core/oxfunctions.php';
// As in new bootstrap to get db instance.
$oConfigFile = new OxConfigFile(OX_BASE_PATH . "config.inc.php");
OxRegistry::set("OxConfigFile", $oConfigFile);
oxRegistry::set("oxConfig", new oxConfig());
// As in new bootstrap to get db instance.
$oDb = new oxDb();
$oDb->setConfig($oConfigFile);
$oLegacyDb = $oDb->getDb();
OxRegistry::set('OxDb', $oLegacyDb);
oxRegistry::getConfig();
/**
 * Useful for defining custom time
 */
class modOxUtilsDate extends oxUtilsDate
{
    protected $_sTime = null;
    public static function getInstance()
    {
        return oxRegistry::get("oxUtilsDate");
    }
    public function UNITSetTime($sTime)
    {
        $this->_sTime = $sTime;
    }
コード例 #2
0
ファイル: oxshopcontrol.php プロジェクト: ioanok/symfoxid
 /**
  * Checks if shop is in debug mode
  *
  * @return bool
  */
 protected function _isDebugMode()
 {
     if (OxRegistry::get("OxConfigFile")->getVar('iDebug')) {
         return true;
     }
     return false;
 }