本文整理汇总了PHP中OxidTestCase::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP OxidTestCase::setUp方法的具体用法?PHP OxidTestCase::setUp怎么用?PHP OxidTestCase::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OxidTestCase
的用法示例。
在下文中一共展示了OxidTestCase::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* Initialize the fixture.
*
* @return null
*/
protected function setUp()
{
parent::setUp();
$this->cleanUpTable('oxobject2category');
$this->getConfig()->setConfigParam('blUseRightsRoles', 3);
$this->getConfig()->setConfigParam('blUseTimeCheck', true);
}
示例2: setUp
/**
* 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'");
}
示例3: setUp
/**
* Initialize the fixture.
*/
protected function setUp()
{
parent::setUp();
$this->_oArticle = oxNew('oxArticle');
$this->_oArticle->setId("_testArtId");
$this->_oArticle->save();
}
示例4: setUp
/**
* 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);
}
示例5: setUp
/**
* Fixture setUp.
*/
protected function setUp()
{
parent::setUp();
oxRegistry::getSession()->delBasket();
$this->setConfigParam('blPerfNoBasketSaving', false);
$this->_createUsers();
}
示例6: setUp
/**
* 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();
}
示例7: setUp
/**
* Fixture setUp.
*/
protected function setUp()
{
parent::setUp();
$this->originalSessionChallenge = oxRegistry::getSession()->getVariable('sess_challenge');
$query = 'update oxdelivery set oxactive = 0';
oxDb::getDb()->execute($query);
}
示例8: setUp
/**
* 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();
}
示例9: 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');
}
示例10: setUp
/**
* Fixture setUp.
*/
protected function setUp()
{
parent::setUp();
$this->insertArticle();
$this->insertUser();
$this->originalSessionChallenge = oxRegistry::getSession()->getVariable('sess_challenge');
}
示例11: setUp
/**
* Initialize the fixture.
*/
protected function setUp()
{
parent::setUp();
$this->_reset();
$this->cleanTmpDir();
$this->getConfig()->setConfigParam('blOEPayPalSandboxMode', true);
}
示例12: setUp
/**
* 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")');
}
示例13: setUp
/**
* Initialize the fixture.
*
* @return null
*/
protected function setUp()
{
parent::setUp();
$this->getConfig()->sTheme = false;
// copying
$this->_iCurr = $this->getSession()->getVariable('currency');
}
示例14: setUp
/**
* Initialize the fixture.
*/
protected function setUp()
{
parent::setUp();
// backuping
$this->requestMethod = $_SERVER["REQUEST_METHOD"];
$this->requestUri = $_SERVER['REQUEST_URI'];
}
示例15: setUp
/**
* 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', '');
}