/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->cleanUpTable('oxobject2category'); $this->getConfig()->setConfigParam('blUseRightsRoles', 3); $this->getConfig()->setConfigParam('blUseTimeCheck', true); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); oxDb::getDb()->execute("insert into oxobject2discount set oxid='_testO2DRemove1', oxdiscountid='_testDiscount', oxobjectid = 'oxidsmallcust', oxtype = 'oxgroups'"); oxDb::getDb()->execute("insert into oxobject2discount set oxid='_testO2DRemove2', oxdiscountid='_testDiscount', oxobjectid = 'oxidmiddlecust', oxtype = 'oxgroups'"); oxDb::getDb()->execute("insert into oxobject2discount set oxid='_testO2DRemove3', oxdiscountid='_testDiscount', oxobjectid = 'oxidgoodcust', oxtype = 'oxgroups'"); }
/** * Initialize the fixture. */ protected function setUp() { parent::setUp(); $this->_oArticle = oxNew('oxArticle'); $this->_oArticle->setId("_testArtId"); $this->_oArticle->save(); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->_oTestObject = oxNew('oxLanguageException', $this->_sMsg); $this->assertEquals('OxidEsales\\EshopCommunity\\Core\\Exception\\LanguageException', get_class($this->_oTestObject)); $this->_oTestObject->setLangConstant($this->_sLanguageConstant); }
/** * Fixture setUp. */ protected function setUp() { parent::setUp(); oxRegistry::getSession()->delBasket(); $this->setConfigParam('blPerfNoBasketSaving', false); $this->_createUsers(); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->_oTestObject = oxNew('oxLanguageException', $this->_sMsg); $this->assertEquals('oxLanguageException', get_class($this->_oTestObject)); $this->_oTestObject->setLangConstant($this->_sLanguageConstant); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $myConfig = $this->getConfig(); $this->_aIds = array(); // percental $oSerie = oxNew('oxvoucherserie'); $oSerie->oxvoucherseries__oxserienr = new oxField('Test Mod Voucher Serie', oxField::T_RAW); $oSerie->oxvoucherseries__oxdiscount = new oxField(50, oxField::T_RAW); $oSerie->oxvoucherseries__oxdiscounttype = new oxField('percent', oxField::T_RAW); $oSerie->oxvoucherseries__oxbegindate = new oxField('0000-00-00 00:00:00', oxField::T_RAW); $oSerie->oxvoucherseries__oxenddate = new oxField('0000-00-00 00:00:00', oxField::T_RAW); $oSerie->oxvoucherseries__oxallowsameseries = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxallowotherseries = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxallowuseanother = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxshopid = new oxField($myConfig->getBaseShopId(), oxField::T_RAW); $oSerie->save(); $this->_aIds[] = $oSerie->getId(); // abs $oSerie = oxNew('oxvoucherserie'); $oSerie->oxvoucherseries__oxserienr = new oxField('Test Mod Voucher Serie', oxField::T_RAW); $oSerie->oxvoucherseries__oxdiscount = new oxField(0.999, oxField::T_RAW); $oSerie->oxvoucherseries__oxdiscounttype = new oxField('absolute', oxField::T_RAW); $oSerie->oxvoucherseries__oxbegindate = new oxField('0000-00-00 00:00:00', oxField::T_RAW); $oSerie->oxvoucherseries__oxenddate = new oxField('0000-00-00 00:00:00', oxField::T_RAW); $oSerie->oxvoucherseries__oxallowsameseries = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxallowotherseries = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxallowuseanother = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxshopid = new oxField($myConfig->getBaseShopId(), oxField::T_RAW); $oSerie->save(); $this->_aIds[] = $oSerie->getId(); $this->_addAdditionalInfo(); }
/** * Fixture setUp. */ protected function setUp() { parent::setUp(); $this->originalSessionChallenge = oxRegistry::getSession()->getVariable('sess_challenge'); $query = 'update oxdelivery set oxactive = 0'; oxDb::getDb()->execute($query); }
/** * Initialize the fixture. */ protected function setUp() { $oDb = oxDb::getDb(); $sQ = "insert into oxfiles (oxid, OXARTID, OXFILENAME, OXSTOREHASH) values ('testId1','_testProd1','testFile','testFileH')"; $oDb->execute($sQ); parent::setUp(); }
/** * Initialize the fixture. */ protected function setUp() { parent::setUp(); // demo article $sId = $this->getTestConfig()->getShopEdition() == 'EE' ? '2275' : '2077'; $sNewId = oxUtilsObject::getInstance()->generateUId(); $this->oArticle = oxNew('oxArticle'); $this->oArticle->disableLazyLoading(); $this->oArticle->Load($sId); // making copy $this->oArticle->setId($sNewId); $this->oArticle->oxarticles__oxweight = new oxField(10, oxField::T_RAW); $this->oArticle->oxarticles__oxstock = new oxField(100, oxField::T_RAW); $this->oArticle->oxarticles__oxprice = new oxField(19, oxField::T_RAW); $this->oArticle->oxarticles__oxstockflag = new oxField(2, oxField::T_RAW); $this->oArticle->save(); // demo category $sId = $this->getTestConfig()->getShopEdition() == 'EE' ? '30e44ab82c03c3848.49471214' : '8a142c3e4143562a5.46426637'; $sNewId = oxUtilsObject::getInstance()->generateUId(); $this->oCategory = oxNew('oxBase'); $this->oCategory->Init('oxcategories'); $this->oCategory->Load($sId); // making copy $this->oCategory->setId($sNewId); $this->oCategory->save(); // assigning article to category $oO2Group = oxNew('oxobject2category'); $oO2Group->oxobject2category__oxshopid = new oxField($this->getConfig()->getShopId(), oxField::T_RAW); $oO2Group->oxobject2category__oxobjectid = new oxField($this->oArticle->getId(), oxField::T_RAW); $oO2Group->oxobject2category__oxcatnid = new oxField($this->oCategory->getId(), oxField::T_RAW); $oO2Group->save(); $this->dDefaultVAT = $this->getConfig()->getConfigParam('dDefaultVAT'); $this->getConfig()->setConfigParam('dDefaultVAT', '99'); }
/** * Fixture setUp. */ protected function setUp() { parent::setUp(); $this->insertArticle(); $this->insertUser(); $this->originalSessionChallenge = oxRegistry::getSession()->getVariable('sess_challenge'); }
/** * Initialize the fixture. */ protected function setUp() { parent::setUp(); $this->_reset(); $this->cleanTmpDir(); $this->getConfig()->setConfigParam('blOEPayPalSandboxMode', true); }
/** * Article_Review test setup * * @return null */ protected function setUp() { parent::setUp(); $articleId = $this->getTestArticleId(); oxDb::getDb()->execute('replace into oxreviews (OXID, OXACTIVE, OXOBJECTID, OXTYPE, OXTEXT, OXUSERID, OXCREATE, OXLANG, OXRATING) values ("_test_i1", 1, "' . $articleId . '", "oxarticle", "aa", "' . oxADMIN_LOGIN . '", "0000-00-00 00:00:00", "0", "3")'); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->getConfig()->sTheme = false; // copying $this->_iCurr = $this->getSession()->getVariable('currency'); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); oxDb::getDb()->execute("insert into oxobject2discount set oxid='_testO2DRemove1', oxdiscountid='_testDiscount', oxobjectid = 'a7c40f631fc920687.20179984', oxtype = 'oxcountry'"); oxDb::getDb()->execute("insert into oxobject2discount set oxid='_testO2DRemove2', oxdiscountid='_testDiscount', oxobjectid = 'a7c40f6320aeb2ec2.72885259', oxtype = 'oxcountry'"); oxDb::getDb()->execute("insert into oxobject2discount set oxid='_testO2DRemove3', oxdiscountid='_testDiscount', oxobjectid = 'a7c40f6321c6f6109.43859248', oxtype = 'oxcountry'"); }
/** * Initialize the fixture. */ protected function setUp() { parent::setUp(); // backuping $this->requestMethod = $_SERVER["REQUEST_METHOD"]; $this->requestUri = $_SERVER['REQUEST_URI']; }
/** * Initialize the fixture. */ protected function setUp() { parent::setUp(); $oPriceCat = oxNew('oxcategory'); $oPriceCat->oxcategories__oxactive = new oxField(1, oxField::T_RAW); $oPriceCat->oxcategories__oxparentid = new oxField("oxrootid", oxField::T_RAW); $oPriceCat->oxcategories__oxshopid = new oxField($this->getConfig()->getBaseShopId(), oxField::T_RAW); $oPriceCat->oxcategories__oxtitle = new oxField("Price Cat 1", oxField::T_RAW); $oPriceCat->oxcategories__oxpricefrom = new oxField(1, oxField::T_RAW); $oPriceCat->oxcategories__oxpriceto = new oxField(100, oxField::T_RAW); $oPriceCat->save(); $this->categories[$oPriceCat->getId()] = $oPriceCat; $oPriceCat = oxNew('oxcategory'); $oPriceCat->oxcategories__oxactive = new oxField(1, oxField::T_RAW); $oPriceCat->oxcategories__oxparentid = new oxField("oxrootid", oxField::T_RAW); $oPriceCat->oxcategories__oxshopid = new oxField($this->getConfig()->getBaseShopId(), oxField::T_RAW); $oPriceCat->oxcategories__oxtitle = new oxField("Price Cat 2", oxField::T_RAW); $oPriceCat->oxcategories__oxpricefrom = new oxField(1, oxField::T_RAW); $oPriceCat->oxcategories__oxpriceto = new oxField(100, oxField::T_RAW); $oPriceCat->save(); $this->categories[$oPriceCat->getId()] = $oPriceCat; $this->getConfig()->setGlobalParameter('aLocalVendorCache', null); oxRegistry::getUtils()->toFileCache('aLocalVendorCache', ''); oxRegistry::getUtils()->toFileCache('aLocalCatCache', ''); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $oArticle = oxNew('oxArticle'); $oArticle->setId('xxx'); $oArticle->oxarticles__oxshopid = new oxField($this->getConfig()->getBaseShopId(), oxField::T_RAW); $oArticle->oxarticles__oxparentid = new oxField('2000', oxField::T_RAW); $oArticle->oxarticles__oxvarselect = new oxField('yyy', oxField::T_RAW); $oArticle->oxarticles__oxtitle = new oxField('xxx', oxField::T_RAW); $oArticle->save(); $oSel = oxNew('oxbase'); $oSel->init('oxselectlist'); $oSel->setId('xxx'); $oSel->oxselectlist__oxvaldesc = new oxField('S, 10!P!10__@@M, 20!P!20__@@L, 30!P!30__@@', oxField::T_RAW); $oSel->save(); $oSel = oxNew('oxbase'); $oSel->init('oxselectlist'); $oSel->setId('yyy'); $oSel->oxselectlist__oxvaldesc = new oxField('R, 10!P!10%__@@G, 20!P!20%__@@B, 30!P!30%__@@', oxField::T_RAW); $oSel->save(); $oO2Sel = oxNew('oxbase'); $oO2Sel->init('oxobject2selectlist'); $oO2Sel->oxobject2selectlist__oxobjectid = new oxField('xxx', oxField::T_RAW); $oO2Sel->oxobject2selectlist__oxselnid = new oxField('xxx', oxField::T_RAW); $oO2Sel->save(); $oO2Sel = oxNew('oxbase'); $oO2Sel->init('oxobject2selectlist'); $oO2Sel->oxobject2selectlist__oxobjectid = new oxField('xxx', oxField::T_RAW); $oO2Sel->oxobject2selectlist__oxselnid = new oxField('yyy', oxField::T_RAW); $oO2Sel->save(); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->_oTestObject = oxNew('oxArticleException', $this->_sMsg); $this->_oTestObject->setArticleNr($this->_sArticle); $this->_oTestObject->setProductId($this->_sArticle); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $myConfig = $this->getConfig(); $this->getConfig()->setConfigParam('blPerfNoBasketSaving', true); // adding test order $oOrder = oxNew('oxbase'); $oOrder->init('oxorder'); $oOrder->setId('_testOrder'); $oOrder->oxorder__oxuserid = new oxField('oxdefaultadmin'); $oOrder->save(); // adding test article $oArticle = oxNew('oxbase'); $oArticle->init('oxarticles'); $oArticle->load('1126'); $oArticle->setId('_testArticle'); $oArticle->oxarticles__oxartnum = new oxField('_testArticle'); $oArticle->oxarticles__oxstock = new oxField(100); $oArticle->save(); //set order $oOrder = oxNew("oxOrder"); $oOrder->setId('_testOrderId1'); $oOrder->oxorder__oxshopid = new oxField($myConfig->getShopId(), oxField::T_RAW); $oOrder->oxorder__oxuserid = new oxField("_testUserId", oxField::T_RAW); $oOrder->oxorder__oxbillcountryid = new oxField('10', oxField::T_RAW); $oOrder->oxorder__oxdelcountryid = new oxField('11', oxField::T_RAW); $oOrder->oxorder__oxdeltype = new oxField('_testDeliverySetId', oxField::T_RAW); $oOrder->oxorder__oxpaymentid = new oxField('_testPaymentId', oxField::T_RAW); $oOrder->oxorder__oxpaymenttype = new oxField('_testPaymentId', oxField::T_RAW); $oOrder->oxorder__oxcardid = new oxField('_testWrappingId', oxField::T_RAW); $oOrder->save(); }
/** * Set up */ protected function setUp() { parent::setUp(); // fix for state ID compatability between editions $sSqlState = "REPLACE INTO `oxstates` (`OXID`, `OXCOUNTRYID`, `OXTITLE`, `OXISOALPHA2`, `OXTITLE_1`, `OXTITLE_2`, `OXTITLE_3`, `OXTIMESTAMP`) " . "VALUES ('333', '8f241f11096877ac0.98748826', 'USA last state', 'SS', 'USA last state', '', '', CURRENT_TIMESTAMP);"; oxDb::getDb()->execute($sSqlState); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); if ($this->getConfig()->getEdition() !== 'EE') { $this->setCategoriesViewTable('oxv_oxcategories_de'); $this->setObject2CategoryViewTable('oxobject2category'); $this->setShopIdTest('oxbaseshop'); $this->addToDatabase("insert into oxcategories set oxid='_testCategory', oxtitle='_testCategory', oxshopid='" . $this->getShopIdTest() . "'", 'oxcategories'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2Category', oxcatnid='_testCategory', oxobjectid = '_testObject'", 'oxobject2category'); } else { $this->addToDatabase("insert into oxcategories set oxid='_testCategory', oxtitle='_testCategory'", 'oxcategories'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2Category', oxshopid='" . $this->getShopIdTest() . "', oxcatnid='_testCategory', oxobjectid = '_testObject'", 'oxobject2category'); } $this->addToDatabase("insert into oxcategories set oxid='_testCategory1', oxtitle='_testCategory1', oxshopid='" . $this->getShopIdTest() . "'", 'oxcategories'); $this->addToDatabase("insert into oxcategories set oxid='_testCategory2', oxtitle='_testCategory2', oxshopid='" . $this->getShopIdTest() . "'", 'oxcategories'); $this->addToDatabase("insert into oxcategories set oxid='_testCategory3', oxtitle='_testCategory3', oxshopid='" . $this->getShopIdTest() . "'", 'oxcategories'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2CategoryRemove1', oxcatnid='_testCategory1', oxobjectid = '_testObjectRemove'", 'oxobject2category'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2CategoryRemove2', oxcatnid='_testCategory2', oxobjectid = '_testObjectRemove'", 'oxobject2category'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2CategoryRemoveAll1', oxcatnid='_testCategory1', oxobjectid = '_testObjectRemoveAll'", 'oxobject2category'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2CategoryRemoveAll2', oxcatnid='_testCategory2', oxobjectid = '_testObjectRemoveAll'", 'oxobject2category'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2CategoryRemoveAll3', oxcatnid='_testCategory3', oxobjectid = '_testObjectRemoveAll'", 'oxobject2category'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2CategoryUpdateDate', oxcatnid='_testCategory', oxobjectid = '_testObjectUpdateDate'", 'oxobject2category'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2CategoryDefault1', oxcatnid='_testCategory1', oxobjectid = '_testObjectDefault'", 'oxobject2category'); $this->addToDatabase("insert into oxobject2category set oxid='_testObject2CategoryDefault2', oxcatnid='_testCategory2', oxobjectid = '_testObjectDefault'", 'oxobject2category'); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $myConfig = $this->getConfig(); $oSerie = oxNew('oxvoucherserie'); $oSerie->oxvoucherseries__oxserienr = new oxField('Test Mod Voucher Serie', oxField::T_RAW); $oSerie->oxvoucherseries__oxdiscount = new oxField(0.99, oxField::T_RAW); $oSerie->oxvoucherseries__oxdiscounttype = new oxField('absolute', oxField::T_RAW); $oSerie->oxvoucherseries__oxbegindate = new oxField(date('Y-m-d H:i:s', time() - 3600 * 3), oxField::T_RAW); $oSerie->oxvoucherseries__oxenddate = new oxField(date('Y-m-d H:i:s', time() + 3600 * 3), oxField::T_RAW); $oSerie->oxvoucherseries__oxallowsameseries = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxallowotherseries = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxallowuseanother = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxminimumvalue = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxshopid = new oxField($myConfig->getBaseShopId(), oxField::T_RAW); $oSerie->save(); $this->_aSerieOxid[] = $oSerie->getId(); $aGroupsToAdd = array('oxidsmallcust', 'oxidmiddlecust', 'oxidgoodcust', 'oxidadmin'); $this->addAdditionalInfo($oSerie->getId(), $aGroupsToAdd); $oSerie = oxNew('oxvoucherserie'); $oSerie->oxvoucherseries__oxserienr = new oxField('Test Mod Voucher Serie', oxField::T_RAW); $oSerie->oxvoucherseries__oxdiscount = new oxField(9.99, oxField::T_RAW); $oSerie->oxvoucherseries__oxdiscounttype = new oxField('percent', oxField::T_RAW); $oSerie->oxvoucherseries__oxbegindate = new oxField(date('Y-m-d H:i:s', time() - 3600 * 3), oxField::T_RAW); $oSerie->oxvoucherseries__oxenddate = new oxField(date('Y-m-d H:i:s', time() + 3600 * 3), oxField::T_RAW); $oSerie->oxvoucherseries__oxallowsameseries = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxallowotherseries = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxallowuseanother = new oxField(0, oxField::T_RAW); $oSerie->oxvoucherseries__oxminimumvalue = new oxField(100, oxField::T_RAW); $oSerie->oxvoucherseries__oxshopid = new oxField($myConfig->getBaseShopId(), oxField::T_RAW); $oSerie->save(); $this->_aSerieOxid[] = $oSerie->getId(); $aGroupsToAdd = array('oxidsmallcust', 'oxidmiddlecust', 'oxidgoodcust', 'oxidcustomer'); $this->addAdditionalInfo($oSerie->getId(), $aGroupsToAdd); }
protected function setUp() { if ($this->getName() == "testMultilangObjectDeletion") { $this->_insertTestLanguage(); } parent::setUp(); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); oxDb::getDb()->execute("insert into oxdiscount set oxid='_testO2DRemove1', oxitmartid = '_testObjectRemove1', oxsort = '1900'"); oxDb::getDb()->execute("insert into oxdiscount set oxid='_testO2DRemove2', oxitmartid = '_testObjectRemove2', oxsort = '1910'"); oxDb::getDb()->execute("insert into oxdiscount set oxid='_testO2DRemove3', oxitmartid = '_testObjectRemove3', oxsort = '1920'"); oxDb::getDb()->execute("insert into oxdiscount set oxid='_testO2DRemove4', oxitmartid = ''"); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); oxRegistry::get("oxSeoEncoder")->setPrefix('oxid'); oxRegistry::get("oxSeoEncoder")->setSeparator(); oxTestModules::cleanUp(); oxTestModules::addFunction("oxutils", "seoIsActive", "{return true;}"); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->_oTestObject = oxNew('oxOutOfStockException', $this->_sMsg); $this->assertEquals('OxidEsales\\EshopCommunity\\Core\\Exception\\OutOfStockException', get_class($this->_oTestObject)); $this->_oTestObject->setRemainingAmount($this->_iAmount); $this->_oTestObject->setBasketIndex($this->_sBasketIndex); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->_oxLinks = oxNew("oxlinks", getViewName('oxlinks')); $this->_oxLinks->setId('testlink'); $this->_oxLinks->oxlinks__oxurl = new oxField('http://www.oxid-esales.com', oxField::T_RAW); $this->_oxLinks->Save(); }
/** * Initialize the fixture. * * @return null */ protected function setUp() { parent::setUp(); $this->_oTestObject = oxNew('oxFileException', $this->_sMsg); $this->assertEquals('OxidEsales\\EshopCommunity\\Core\\Exception\\FileException', get_class($this->_oTestObject)); $this->_oTestObject->setFileName($this->_sFileName); $this->_oTestObject->setFileError($this->_sFileError); }
/** * Initialize the fixture. */ protected function setUp() { parent::setUp(); $this->setConfigParam('blEnterNetPrice', false); $oUser = oxNew('oxuser'); $oUser->setId('test'); $oUser->save(); }