コード例 #1
0
 /**
  * Cleans up the registry before/after the test execution
  *
  * @return null;
  */
 protected function _resetRegistry()
 {
     $aRegKeys = oxRegistry::getKeys();
     $aSkippedClasses = array("oxconfigfile");
     foreach ($aRegKeys as $sKey) {
         if (!in_array($sKey, $aSkippedClasses)) {
             oxRegistry::set($sKey, null);
         }
     }
 }
コード例 #2
0
 /**
  * Cleans up the registry
  *
  * @return null;
  */
 protected function _resetRegistry()
 {
     $aRegKeys = oxRegistry::getKeys();
     $aSkippedClasses = array("oxconfigfile");
     foreach ($aRegKeys as $sKey) {
         if (!in_array($sKey, $aSkippedClasses)) {
             $oInstance = null;
             if (!isset(self::$_aRegistryCache[$sKey])) {
                 try {
                     $oNewInstance = oxNew($sKey);
                     self::$_aRegistryCache[$sKey] = $oNewInstance;
                 } catch (oxSystemComponentException $oException) {
                     oxRegistry::set($sKey, null);
                     continue;
                 }
             }
             $oInstance = clone self::$_aRegistryCache[$sKey];
             oxRegistry::set($sKey, $oInstance);
         }
     }
 }