当前位置: 首页>>代码示例>>PHP>>正文


PHP oxTestModules::cleanUp方法代码示例

本文整理汇总了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;}");
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:13,代码来源:oxseoencoderarticleTest.php

示例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();
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:14,代码来源:oxviewTest.php

示例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());
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:10,代码来源:oxconfigTest.php

示例4: run

 public function run(PHPUnit_Framework_TestResult $result = null)
 {
     if (!self::$_aInitialDbChecksum) {
         self::initializeDbChecksum();
     }
     $result = parent::run($result);
     oxTestModules::cleanUp();
     return $result;
 }
开发者ID:alexschwarz89,项目名称:Barzahlen-OXID-4.7,代码行数:9,代码来源:OxidTestCase.php

示例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;
     }
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:18,代码来源:oxseodecoderTest.php

示例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();
 }
开发者ID:suabo,项目名称:oxid_modules_config,代码行数:26,代码来源:OxidTestCase.php

示例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();
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:26,代码来源:oxoutputTest.php


注:本文中的oxTestModules::cleanUp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。