/**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     oxTestModules::addFunction('oxVendor', 'cleanRootVendor', '{oxVendor::$_aRootVendor = array();}');
     oxNew('oxvendor')->cleanRootVendor();
     oxRemClassModule('oxUtilsHelper');
     parent::tearDown();
 }
Example #2
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     oxRemClassModule('modoxdeliverylist_oxorder');
     $this->cleanUpTable('oxorder');
     $this->cleanUpTable('oxorderarticles');
     $this->cleanUpTable('oxdeliveryset');
     $this->cleanUpTable('oxpayments');
     $this->cleanUpTable('oxwrapping');
     $this->cleanUpTable('oxarticles');
     $this->cleanUpTable('oxorderarticles');
     $this->cleanUpTable('oxuserbaskets');
     $this->cleanUpTable('oxuserbaskets', 'oxuserid');
     $this->cleanUpTable('oxuserbasketitems');
     $this->cleanUpTable('oxarticles');
     $this->cleanUpTable('oxpayments');
     $this->cleanUpTable('oxuser');
     $this->cleanUpTable('oxdelivery');
     $this->cleanUpTable('oxdiscount');
     $this->cleanUpTable('oxobject2discount');
     $this->cleanUpTable('oxdel2delset');
     $this->cleanUpTable('oxobject2delivery');
     $this->cleanUpTable('oxselectlist');
     $this->cleanUpTable('oxobject2selectlist');
     $this->cleanUpTable('oxorderarticles', 'oxorderid');
     $this->cleanUpTable('oxuserpayments', 'oxuserid');
     $this->cleanUpTable('oxvouchers');
     $this->cleanUpTable('oxvouchers', 'oxorderid');
     $this->cleanUpTable('oxvoucherseries');
     $oDb = oxDb::getDb();
     $oDb->execute("delete from oxuserbasketitems");
     $oDb->execute("delete from oxuserbaskets");
     oxArticleHelper::cleanup();
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     oxRemClassModule('modOxUtilsDate');
     $this->cleanUpTable('oxobject2discount');
     $this->cleanUpTable('oxcategories');
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     oxTestModules::addFunction('oxManufacturer', 'cleanRootManufacturer', '{oxManufacturer::$_aRootManufacturer = array();}');
     oxNew('oxManufacturer')->cleanRootManufacturer();
     oxRemClassModule('modUtils_oxManufacturerlist');
     parent::tearDown();
 }
Example #5
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $this->getConfig()->setGlobalParameter('listtype', null);
     oxRemClassModule('oxCacheHelper');
     $this->cleanUpTable('oxobject2attribute');
     // ensure modules detached
     oxTestModules::cleanAllModules();
     $oDB = oxDb::getDB();
     $oDB->execute('delete from oxaccessoire2article where oxarticlenid="_testArt" ');
     $oDB->execute("update oxattribute set oxdisplayinbasket = 0 where oxid = '8a142c3f0b9527634.96987022' ");
     $this->cleanUpTable('oxarticles');
     $this->cleanUpTable('oxartextends');
     $this->cleanUpTable('oxcategories');
     $this->cleanUpTable('oxorderarticles');
     $this->cleanUpTable('oxprice2article', 'oxartid');
     $this->cleanUpTable('oxobject2category');
     $this->cleanUpTable('oxobject2category', 'oxobjectid');
     $this->cleanUpTable('oxobject2category', 'oxcatnid');
     $this->cleanUpTable('oxreviews');
     $this->cleanUpTable('oxdiscount');
     $oDB->Execute('delete from oxselectlist where oxid = "_testoxsellist" ');
     $oDB->Execute('delete from oxobject2selectlist where oxselnid = "_testoxsellist" ');
     oxDb::getInstance()->resetTblDescCache();
     parent::tearDown();
 }
Example #6
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $this->_oObj->delete();
     $this->cleanUpTable('oxdelivery');
     $this->cleanUpTable('oxdel2delset');
     parent::tearDown();
     oxRemClassModule('contentTest_oxUtilsView');
 }
Example #7
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $myDB = oxDb::getDB();
     $sQ = 'delete from oxuser where oxid="test"';
     $myDB->Execute($sQ);
     $this->cleanUpTable('oxreviews');
     oxRemClassModule('modOxUtilsDate');
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $this->cleanUpTable('oxlinks');
     $this->cleanUpTable('oxorder');
     $this->cleanUpTable('oxcontents');
     $this->cleanUpTable('oxobject2category');
     oxRemClassModule('modOxLinks_oxAdminView');
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  */
 public function tearDown()
 {
     oxRemClassModule('Unit\\Core\\modOxUtilsObject_oxUtilsObject');
     $oArticle = oxNew('oxArticle');
     $oArticle->delete('testArticle');
     oxRegistry::get("oxConfigFile")->setVar('blDoNotDisableModuleOnError', $this->getConfigParam('blDoNotDisableModuleOnError'));
     oxRegistry::get("oxConfigFile")->setVar("sShopDir", $this->getConfigParam('sShopDir'));
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     oxRemClassModule('modOxArticle_oxUserBasketItem');
     $oArticle = oxNew('oxArticle');
     $oArticle->delete('xxx');
     $oSel = oxNew('oxbase');
     $oSel->init('oxselectlist');
     $oSel->delete('xxx');
     $oSel->delete('yyy');
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     oxRemClassModule('oxDb_noActiveSnippetInDeliveryList');
     oxRemClassModule('modOxDeliverySetList');
     $this->cleanUpTable('oxuser');
     $this->cleanUpTable('oxaddress');
     $this->cleanUpTable('oxdeliveryset');
     $this->cleanUpTable('oxdelivery');
     $this->cleanUpTable('oxobject2delivery');
     $this->cleanUpTable('oxdel2delset');
     oxRegistry::getSession()->deleteVariable('deladrid');
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  */
 protected function tearDown()
 {
     // deleting demo items
     if ($this->oArticle) {
         $this->oArticle->delete();
     }
     if ($this->oCategory) {
         $this->oCategory->delete();
     }
     oxTestModules::addFunction('oxVatSelector', 'clear', '{ oxVatSelector::$_aUserVatCache = array();}');
     oxNew('oxVatSelector')->clear();
     oxRemClassModule('oxVatSelector');
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $oOrder = oxNew('oxorder');
     $oOrder->delete('_testOrder');
     $oArticle = oxNew('oxArticle');
     $oArticle->delete('_testArticle');
     $this->cleanUpTable('oxorder');
     oxRemClassModule('modOxOrder_orderArticle');
     parent::tearDown();
 }
Example #14
0
 /**
  * clean Ups loaded modules
  *
  * @static
  * @access public
  * @return void
  */
 public static function cleanUp()
 {
     self::$_aModuleMap = array();
     self::$_oOrigOxUtilsObj = null;
     foreach (self::$_addedmods as $class => $arr) {
         //            foreach ($arr as $mod) {
         oxRemClassModule('allmods', $class);
         //          }
     }
     self::$_addedmods = array();
 }
Example #15
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     //remove data from db
     $this->cleanUpTable('oxuser');
     $this->cleanUpTable('oxaddress');
     $this->cleanUpTable('oxobject2group', 'oxobjectid');
     oxRemClassModule('modOxUtils_order');
     oxRemClassModule('modOxUtilsObject_order');
     oxRemClassModule('modOxOrder_order');
     oxRemClassModule('modOxPayment_order');
     parent::tearDown();
 }
Example #16
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $this->removeTestData();
     oxRemClassModule('oxcategoryTest_oxUtilsView');
     parent::tearDown();
 }
Example #17
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $this->_removeDiscounts();
     oxRemClassModule('oxArticle_Extended');
     oxRemClassModule('oxBasket_Extended');
     $this->cleanUpTable('oxdiscount');
     $this->cleanUpTable('oxobject2discount');
     parent::tearDown();
 }
Example #18
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $oUser = oxNew('oxUser');
     if ($oUser->loadActiveUser()) {
         $oUser->logout();
     }
     $oUser->setAdminMode(null);
     oxRegistry::getSession()->deleteVariable('deladrid');
     $this->getSession()->setVariable('usr', null);
     $this->getSession()->setVariable('auth', null);
     // resetting globally admin mode
     // removing email wrapper module
     oxRemClassModule('Unit\\Application\\Model\\UserTest_oxNewsSubscribed');
     oxRemClassModule('Unit\\Application\\Model\\UserTest_oxUtilsServerHelper');
     oxRemClassModule('Unit\\Application\\Model\\UserTest_oxUtilsServerHelper2');
     oxRemClassModule('Unit\\Application\\Model\\oxEmailHelper');
     // removing users
     foreach ($this->_aUsers as $sUserId => $oUser) {
         /** @var oxUser $oUser */
         $oUser->delete($sUserId);
         unset($this->_aUsers[$sUserId]);
     }
     // restore database
     $oDbRestore = self::_getDbRestore();
     $oDbRestore->restoreDB();
     parent::tearDown();
 }
Example #19
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     oxRemClassModule('Unit\\Application\\Model\\modOxDelivery');
     $this->cleanUpTable('oxdelivery');
     $this->cleanUpTable('oxobject2delivery');
     $this->cleanUpTable('oxarticles');
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $this->cleanUpTable('oxcategories');
     oxRemClassModule('modContentListEE_oxcategorylist');
     oxRemClassModule('modContentListCE_oxcategorylist');
     parent::tearDown();
 }
Example #21
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     //removing oxUtils module
     oxRemClassModule('testUtils');
     oxRemClassModule('\\Unit\\Core\\UtilsServerHelper');
     oxRemClassModule('Unit_oxsessionTest_oxUtilsObject');
     $this->oSession->freeze();
     $reportingLevel = (int) getenv('TRAVIS_ERROR_LEVEL');
     error_reporting($reportingLevel ? $reportingLevel : E_ALL ^ E_NOTICE | E_STRICT);
     parent::tearDown();
 }
Example #22
0
 /**
  * Testing if method throws an exception if article is not visible (M:1286)
  *
  * @return null
  */
 public function testGetArticle_notVisibleArticle()
 {
     oxAddClassModule('Unit\\Application\\Model\\modOxArticle_notVisible_oxbasketItem', 'oxArticle');
     $article = $this->createArticle();
     $oBasketItem = oxNew('oxBasketItem');
     try {
         $oBasketItem->getArticle(true, $article->getId());
     } catch (\OxidEsales\EshopCommunity\Core\Exception\NoArticleException $oEx) {
         oxRemClassModule('Unit\\Application\\Model\\modOxArticle_notVisible_oxbasketItem');
         return;
     }
     oxRemClassModule('Unit\\Application\\Model\\modOxArticle_notVisible_oxbasketItem');
     $this->fail('Execption was not thrown when article is not visible');
 }
 /**
  * Testing if method throws an exception if article is not visible (M:1286)
  *
  * @return null
  */
 public function testGetArticle_notVisibleArticle()
 {
     oxAddClassModule('modOxArticle_notVisible_oxbasketItem', 'oxArticle');
     $article = $this->createArticle();
     $oBasketItem = oxNew('oxBasketItem');
     try {
         $oBasketItem->getArticle(true, $article->getId());
     } catch (oxNoArticleException $oEx) {
         oxRemClassModule('modOxArticle_notVisible_oxbasketItem');
         return;
     }
     oxRemClassModule('modOxArticle_notVisible_oxbasketItem');
     $this->fail('Execption was not thrown when article is not visible');
 }
 /**
  * Tear down the fixture.
  */
 protected function tearDown()
 {
     oxRemClassModule('GenericImportTest_oxUtilsServer');
     $this->cleanUpTable('oxuser');
     parent::tearDown();
 }
Example #25
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $oDB = oxDb::getDb();
     $sDelete = "DROP TABLE IF EXISTS oxsessions";
     $oDB->Execute($sDelete);
     //removing oxUtils module
     oxRemClassModule('testUtils');
     oxRemClassModule('Unit_oxsessionTest_oxUtilsServer');
     oxRemClassModule('Unit_oxsessionTest_oxUtilsObject');
     $this->oSession->freeze();
     $reportingLevel = (int) getenv('TRAVIS_ERROR_LEVEL');
     error_reporting($reportingLevel ? $reportingLevel : E_ALL ^ E_NOTICE | E_STRICT);
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     oxRemClassModule('Unit\\Application\\Model\\oxDeliveryListTestClass');
     oxRemClassModule('Unit\\Application\\Model\\oxDb_noActiveSnippetInDeliveryList');
     $this->cleanUpTable('oxdel2delset');
     $this->cleanUpTable('oxobject2category');
     $this->cleanUpTable('oxobject2delivery');
     $this->cleanUpTable('oxarticles');
     $this->cleanUpTable('oxcategories');
     $this->cleanUpTable('oxdeliveryset');
     $this->cleanUpTable('oxuser');
     $this->cleanUpTable('oxdelivery');
     $this->cleanUpTable('oxaddress');
     $this->cleanUpTable('oxobject2group');
     $oDelivery = oxNew('oxDelivery');
     $oDelivery->delete('b763e957be61108f8.80080127');
     $oDelivery->delete('3033e968fb5b30930.92732498');
     $oDelivery->delete('a713e96c15c7bf3c7.45279281');
     $oDelivery->delete('a713e96c1aeaefa75.74010807');
     $oDelivery->delete('bdd46f9f2455153b9.22318118');
     $oDelList = oxNew('oxDeliverySet');
     $oDelList->delete('b3b46b74d3894f9f5.62965460');
     oxRegistry::getSession()->deleteVariable('deladrid');
     parent::tearDown();
 }
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $oDB = oxDb::getDb();
     $sDelete = "delete from oxnewsletter where oxid='newstest'";
     $oDB->Execute($sDelete);
     $sDelete = "delete from oxobject2group where oxobjectid='newstest'";
     $oDB->Execute($sDelete);
     $sDelete = "delete from oxorder where oxid = '9a94569819f6c7368.72892345'";
     $oDB->Execute($sDelete);
     $sDelete = "delete from oxorderarticles where oxorderid = '9a94569819f6c7368.72892345'";
     $oDB->Execute($sDelete);
     $sDelete = "delete from oxactions2article where oxactionid = 'oxnewsletter'";
     $oDB->Execute($sDelete);
     $sDelete = "delete from oxuser where oxusername = '******'";
     $oDB->Execute($sDelete);
     $sDelete = "delete from oxnewssubscribed where oxuserid = 'test'";
     $oDB->Execute($sDelete);
     $sSql = "update oxnewssubscribed set oxemailfailed = '0' where oxuserid = 'oxdefaultadmin' ";
     $oDB->Execute($sSql);
     oxRemClassModule('modEmailOxNewsLetter');
     oxRemClassModule('modEmailOxNewsLetter2');
     parent::tearDown();
 }
Example #28
0
 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $this->cleanUpTable('oxactions');
     $this->cleanUpTable('oxattribute');
     $this->cleanUpTable('oxarticles');
     $this->cleanUpTable('oxcategories');
     $this->cleanUpTable('oxdiscount');
     $this->cleanUpTable('oxnews');
     $this->cleanUpTable('oxorder');
     //clean it
     oxDB::getDb()->execute('delete from oxactions where oxtitle like "test%"');
     oxDB::getDb()->execute('delete from oxnews where oxshortdesc like "oxbasetest%"');
     oxRemClassModule('modoxCacheAdminForBase');
     oxRemClassModule('modoxCacheForBase');
     parent::teardown();
 }
Example #29
0
 /**
  * Tear down the fixture.
  */
 public function tearDown()
 {
     oxRemClassModule('oxUtils_Extended');
     oxRemClassModule('oxOutput_Extended');
     parent::tearDown();
 }