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


PHP oxTestModules::publicize方法代码示例

本文整理汇总了PHP中oxTestModules::publicize方法的典型用法代码示例。如果您正苦于以下问题:PHP oxTestModules::publicize方法的具体用法?PHP oxTestModules::publicize怎么用?PHP oxTestModules::publicize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oxTestModules的用法示例。


在下文中一共展示了oxTestModules::publicize方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testPrepareUriFiltersRootFilesAndReservedKeywords

 public function testPrepareUriFiltersRootFilesAndReservedKeywords()
 {
     oxTestModules::publicize('oxSeoEncoder', '_prepareUri');
     oxTestModules::addFunction('oxSeoEncoder', '_trimUrl', '{return ltrim($aA[0], "u");}');
     $oDb = modDB::getInstance();
     $oDb->addClassFunction('GetOne', array($this, '__SaveToDbCreatesGoodMd5Callback'));
     $iShopId = $this->getConfig()->getBaseShopId();
     $oE = oxNew('oxseoencoder');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('admin-oxid/aa.html', $oE->p_prepareUri('admin/aa.html'), '');
     $oE = oxNew('oxseoencoder');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('index-php/aa/', $oE->p_prepareUri('index.php/aa'), '');
     $oE = oxNew('oxseoencoder');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('index-php/', $oE->p_prepareUri('index.php'), '');
     $oE = oxNew('oxseoencoder');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('/index-oxid/aa.html', $oE->p_prepareUri('/index/aa.html'), '');
     $oE = oxNew('oxseoencoder');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('/index-php/aa.html', $oE->p_prepareUri('/index.php/aa.html'), '');
     $oE = oxNew('oxseoencoder');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('/index-oxid/', $oE->p_prepareUri('/index/'), '');
     $oE = oxNew('oxseoencoder');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('/index-oxid/', $oE->p_prepareUri('/index'), '');
     $oE = oxNew('oxseoencoder');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('index-oxid/', $oE->p_prepareUri('--index'), '');
     $oE = oxNew('oxseoencoder');
     $oE->setSeparator('/');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('/index_oxid/aa.html', $oE->p_prepareUri('/index/aa.html'), '');
     $cl = oxTestModules::addFunction('oxSeoEncoder', 'clean_aReservedEntryKeys', '{oxSeoEncoder::$_aReservedEntryKeys = null;}');
     $oE = new $cl();
     $oE->clean_aReservedEntryKeys();
     $oE->setReservedWords(array('keyword1', 'keyword2'));
     $oE->setSeparator('+');
     $this->aSQL = array();
     $this->aRET = array(false);
     $this->assertEquals('/keyword1+oxid/keyword1+s+keyword2/aa+keyword1.html', $oE->p_prepareUri('/keyword1/keyword1-s.keyword2/aa-keyword1.html'), '');
     $this->assertEquals('/keyword2+oxid/', $oE->p_prepareUri('/keyword2'), '');
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:54,代码来源:oxseoencoderTest.php

示例2: testGetReviewList

 /**
  * Article_Review::_getReviewList() test case
  *
  * @return null
  */
 public function testGetReviewList()
 {
     $articleVariantId = $this->getTestArticleVariantId();
     oxDb::getDb()->execute('replace into oxreviews (OXID, OXACTIVE, OXOBJECTID, OXTYPE, OXTEXT, OXUSERID, OXCREATE, OXLANG, OXRATING)
                     values ("_test_i2", 1, "' . $articleVariantId . '", "oxarticle", "aa", "' . oxADMIN_LOGIN . '", "0000-00-00 00:00:00", "0", "3")');
     oxTestModules::publicize('article_review', '_getReviewList');
     $o = oxNew('article_review');
     $oA = oxNew('oxArticle');
     $oA->load($this->getTestArticleId());
     $this->getConfig()->setConfigParam('blShowVariantReviews', false);
     $this->assertEquals(1, count($o->p_getReviewList($oA)));
     $this->getConfig()->setConfigParam('blShowVariantReviews', true);
     $this->assertEquals(2, count($o->p_getReviewList($oA)));
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:19,代码来源:articlereviewTest.php

示例3: testGetPictureInfoNotFound

 public function testGetPictureInfoNotFound()
 {
     $oCfg = $this->getMock('oxConfig', array('getPicturePath', 'getOutDir', 'getOutUrl'));
     $oCfg->expects($this->once())->method('getPicturePath')->will($this->returnValue(false));
     $oCfg->expects($this->never())->method('getOutDir');
     $oCfg->expects($this->never())->method('getOutUrl');
     $cl = oxTestModules::publicize('oxPictureHandler', '_getPictureInfo');
     $oPicHandler = $this->getMock($cl, array('getConfig'));
     $oPicHandler->expects($this->any())->method('getConfig')->will($this->returnValue($oCfg));
     $this->assertEquals(array('path' => false, 'url' => false), $oPicHandler->p_getPictureInfo('master/product/', 'nopic.jpg'));
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:11,代码来源:oxpicturehandlerTest.php

示例4: testGetSearchParamsUrl

 public function testGetSearchParamsUrl()
 {
     oxTestModules::addFunction('oxLang', 'getBaseLanguage', '{return 5;}');
     oxTestModules::addFunction('oxLang', 'translateString', '{return $aA[0]."%s";}');
     oxTestModules::publicize('oxrssfeed', '_getSearchParamsUrl');
     $oRss = oxNew('oxRssFeed');
     $this->assertEquals('searchparam=a+a', $oRss->p_getSearchParamsUrl('a a', '', '', ''));
     $this->assertEquals('searchparam=+a&searchcnid=b+', $oRss->p_getSearchParamsUrl(' a', 'b ', '', ''));
     $this->assertEquals('searchparam=+a&searchcnid=b+&searchvendor=+c', $oRss->p_getSearchParamsUrl(' a', 'b ', ' c', ''));
     $this->assertEquals('searchparam=+a&searchvendor=+c', $oRss->p_getSearchParamsUrl(' a', '', ' c', ''));
     $this->assertEquals('searchparam=+a&searchmanufacturer=+d+', $oRss->p_getSearchParamsUrl(' a', '', '', ' d '));
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:12,代码来源:oxrssfeedTest.php

示例5: testUnserializeConfVar

 /**
  * _unserializeConfVar test
  *
  * @return null
  */
 public function testUnserializeConfVar()
 {
     $sCl = oxTestModules::publicize('Shop_Config', '_unserializeConfVar');
     $oTest = new $sCl();
     $this->assertEquals('1.1', $oTest->p_unserializeConfVar('str', 'iMinOrderPrice', '1,1'));
     $this->assertEquals('2,2', $oTest->p_unserializeConfVar('str', 'shouldNotChange', '2,2'));
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:12,代码来源:shopconfigTest.php


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