本文整理汇总了PHP中oxTestModules::cleanUp方法的典型用法代码示例。如果您正苦于以下问题:PHP oxTestModules::cleanUp方法的具体用法?PHP oxTestModules::cleanUp怎么用?PHP oxTestModules::cleanUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oxTestModules
的用法示例。
在下文中一共展示了oxTestModules::cleanUp方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* 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;}");
}
示例2: tearDown
/**
* Tear down the fixture.
*
* @return null
*/
protected function tearDown()
{
modOxView::reset();
// restoring
$this->getConfig()->getActiveShop()->oxshops__oxseoactive = new oxField($this->_iSeoMode, oxField::T_RAW);
oxRegistry::getUtils()->seoIsActive(true);
oxTestModules::cleanUp();
parent::tearDown();
}
示例3: testIsSsl_SslMode_WithDifferentParams
public function testIsSsl_SslMode_WithDifferentParams()
{
oxTestModules::addFunction("oxUtilsServer", "getServerVar", '{ if ( $aA[0] == "HTTPS" ) { return 1; } else { return array(); } }');
$oConfig = $this->getMock('oxconfig', array('getConfigParam'));
$oConfig->expects($this->at(0))->method('getConfigParam')->with($this->equalTo('sSSLShopURL'))->will($this->returnValue('https://eshop'));
$this->assertTrue($oConfig->isSsl());
oxTestModules::cleanUp();
oxTestModules::addFunction("oxUtilsServer", "getServerVar", '{ if ( $aA[0] == "HTTPS" ) { return "on"; } else { return array(); } }');
$this->assertTrue($oConfig->isSsl());
}
示例4: run
public function run(PHPUnit_Framework_TestResult $result = null)
{
if (!self::$_aInitialDbChecksum) {
self::initializeDbChecksum();
}
$result = parent::run($result);
oxTestModules::cleanUp();
return $result;
}
示例5: testDecodeUrl
public function testDecodeUrl()
{
oxTestModules::addFunction('oxSeoDecoder', 'parseStdUrl', create_function('$u', 'return array();'));
$oD = oxNew('oxSeoDecoder');
$this->assertSame(false, $oD->decodeUrl($this->getConfig()->getShopURL() . 'Uragarana/'));
$iShopId = $this->getConfig()->getBaseShopId();
try {
$oDb = oxDb::getDb();
$oDb->Execute('insert into oxseo (oxobjectid, oxident, oxshopid, oxlang, oxstdurl, oxseourl, oxtype) values ("aa", "' . md5('uragarana/') . '", "' . $iShopId . '", 1, "std", "uragarana/", "oxarticle")');
$this->assertEquals(array('lang' => 1), $oD->decodeUrl('Uragarana/'));
} catch (Exception $e) {
}
oxTestModules::cleanUp();
$oDb->Execute("delete from oxseo where oxstdurl='std'");
if ($e) {
throw $e;
}
}
示例6: tearDown
/**
* 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();
}
示例7: testSetCharsetSetOutputFormatSendHeaders
public function testSetCharsetSetOutputFormatSendHeaders()
{
$utils = $this->getMock('oxUtils', array('setHeader'));
$utils->expects($this->once())->method('setHeader')->with($this->equalTo('Content-Type: text/html; charset=asd'));
oxTestModules::cleanUp();
oxTestModules::addModuleObject('oxUtils', $utils);
$oOutput = oxNew('oxOutput');
$oOutput->setCharset('asd');
$oOutput->sendHeaders();
$utils = $this->getMock('oxUtils', array('setHeader'));
$utils->expects($this->once())->method('setHeader')->with($this->equalTo('Content-Type: application/json; charset=asdd'));
oxTestModules::cleanUp();
oxTestModules::addModuleObject('oxUtils', $utils);
$oOutput = oxNew('oxOutput');
$oOutput->setCharset('asdd');
$oOutput->setOutputFormat(oxOutput::OUTPUT_FORMAT_JSON);
$oOutput->sendHeaders();
$utils = $this->getMock('oxUtils', array('setHeader'));
$utils->expects($this->once())->method('setHeader')->with($this->equalTo('Content-Type: text/html; charset=asdd'));
oxTestModules::cleanUp();
oxTestModules::addModuleObject('oxUtils', $utils);
$oOutput = oxNew('oxOutput');
$oOutput->setCharset('asdd');
$oOutput->setOutputFormat(oxOutput::OUTPUT_FORMAT_HTML);
$oOutput->sendHeaders();
}