示例#1
0
 /**
  * checks if cleanup is a success
  */
 protected function sharedAssertions()
 {
     // it runs before tearDown, so our tearDown will be able to use db again
     modDb::getInstance()->cleanup();
 }
 /**
  * Executed after test is down
  *
  */
 protected function tearDown()
 {
     $this->cleanUpDatabase();
     modDb::getInstance()->modAttach(modDb::getInstance()->getRealInstance());
     oxTestsStaticCleaner::clean('oxUtilsObject', '_aInstanceCache');
     oxTestsStaticCleaner::clean('oxArticle', '_aLoadedParents');
     modInstances::cleanup();
     oxTestModules::cleanUp();
     modOxid::globalCleanup();
     modDB::getInstance()->cleanup();
     $this->getSession()->cleanup();
     $this->getConfig()->cleanup();
     $_SERVER = $this->_aBackup['_SERVER'];
     $_POST = $this->_aBackup['_POST'];
     $_GET = $this->_aBackup['_GET'];
     $_SESSION = $this->_aBackup['_SESSION'];
     $_COOKIE = $this->_aBackup['_COOKIE'];
     $this->_resetRegistry();
     oxUtilsObject::resetClassInstances();
     oxUtilsObject::resetModuleVars();
     parent::tearDown();
 }