• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP WikiaBaseTest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setUp

 public function setUp()
 {
     $dir = dirname(__FILE__) . '/../../../';
     global $wgAutoloadClasses;
     $this->setupFile = $dir . 'HubRssFeed.setup.php';
     parent::setUp();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:PopularArticlesModelTest.php


示例2: tearDown

 function tearDown()
 {
     global $wgDevelEnvironment, $wgDevelEnvironmentName;
     $wgDevelEnvironment = $this->wgDevelEnv;
     $wgDevelEnvironmentName = $this->wgDevelEnvName;
     parent::tearDown();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:GlobalTitleTest.php


示例3: tearDown

 public function tearDown()
 {
     global $wgApiAccess, $wgApiEnvironment;
     $wgApiAccess = $this->org_wgApiAccess;
     $wgApiEnvironment = $this->org_wgApiEnvironment;
     parent::tearDown();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:ApiAccessServiceTest.php


示例4: setUp

 public function setUp()
 {
     global $IP;
     $this->setupFile = "{$IP}/extensions/wikia/JsonFormat/JsonFormat.setup.php";
     $this->mockGlobalVariable('wgTitle', Title::newFromText('TestPageDoesNotExist'));
     parent::setUp();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:JsonFormatTest.php


示例5: setUp

 public function setUp()
 {
     $this->setupFile = dirname(__FILE__) . '/../ShareButtons.setup.php';
     parent::setUp();
     $this->mockGlobalVariable('wgTitle', Title::newMainPage());
     $this->mockApp();
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:7,代码来源:ShareButtonsTest.php


示例6: setUp

 public function setUp()
 {
     $this->setupFile = __DIR__ . '/../LyricFind.setup.php';
     parent::setUp();
     // mock title and prevent DB changes
     $this->mockGlobalVariable('wgTitle', $this->mockClassWithMethods('Title', ['getArticleID' => 123]));
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:LyricFindControllerTest.php


示例7: setUp

 public function setUp()
 {
     $this->setupFile = __DIR__ . '/../AutoFollow.setup.php';
     parent::setUp();
     $this->mockGlobalVariable('wgAutoFollowFlag', 'autowatched-already');
     $this->mockGlobalVariable('wgAutoFollowLangCityIdMap', ['de' => 1779, 'en' => 177, 'es' => 3487, 'fi' => 3083, 'fr' => 10261, 'it' => 11250, 'ja' => 3439, 'nl' => 10466, 'pl' => 1686, 'pt' => 696403, 'ru' => 3321, 'uk' => 3321, 'zh' => 4079]);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:AutoFollowHooksTest.php


示例8: setUp

 public function setUp()
 {
     $this->setupFile = __DIR__ . "/../AbPerformanceTesting.setup.php";
     parent::setUp();
     $this->mockGlobalVariable('wgCityId', 5123);
     $this->mockGlobalFunction('wfGetBeaconId', '8gQHS-Q4_c');
 }
开发者ID:yusufchang,项目名称:app,代码行数:7,代码来源:ExperimentTest.php


示例9: setUp

 protected function setUp()
 {
     global $wgCityId;
     $this->wgCityId = $wgCityId;
     $this->setupFile = dirname(__FILE__) . '/../FounderProgressBar.setup.php';
     parent::setUp();
     // Mock response using $this->getValCallBack()
     $mockR = $this->getMock('WikiaResponse', array('getVal'), array('raw'));
     $mockR->expects($this->any())->method('getVal')->will($this->returnCallback(array($this, "getValCallback")));
     $mock_result = $this->getMock('ResultWrapper', array(), array(), '', false);
     $this->mock_db = $this->getMock('DatabaseMysql', array('select', 'query', 'update', 'commit', 'fetchObject', 'fetchRow'));
     $this->mock_db->expects($this->any())->method('select')->will($this->returnValue($mock_result));
     $this->mock_db->expects($this->any())->method('query');
     $this->mock_db->expects($this->any())->method('update');
     $this->mock_db->expects($this->any())->method('commit');
     $cache = $this->getMock('stdClass', array('get', 'set', 'delete'));
     $cache->expects($this->any())->method('get')->will($this->returnValue(null));
     $cache->expects($this->any())->method('set');
     $cache->expects($this->any())->method('delete');
     $mock = $this->getMock('FounderProgressBarController', array('sendSelfRequest', 'getDb', 'getMCache'));
     $mock->expects($this->any())->method('sendSelfRequest')->will($this->returnValue($mockR));
     $mock->expects($this->any())->method('getDb')->will($this->returnValue($this->mock_db));
     $mock->expects($this->any())->method('getMCache')->will($this->returnValue($cache));
     F::setInstance("FounderProgressBarController", $mock);
     $this->object = F::build('FounderProgressBarController');
     $this->task_id = 0;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:27,代码来源:FounderProgressBarTest.php


示例10: setUp

 protected function setUp()
 {
     require_once dirname(__FILE__) . '/../SpecialCssHooks.class.php';
     require_once dirname(__FILE__) . '/../SpecialCssModel.class.php';
     require_once dirname(__FILE__) . '/../SpecialCssController.class.php';
     parent::setUp();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:SpecialCssHooksTest.php


示例11: tearDown

 public function tearDown()
 {
     if (!empty($this->tmpFile)) {
         unlink($this->tmpFile);
     }
     parent::tearDown();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:ImageServingCroppingTest.php


示例12: setUp

 public function setUp()
 {
     parent::setUp();
     global $IP;
     include_once $IP . '/includes/wikia/ui/Factory.class.php';
     $this->instance = Wikia\UI\Factory::getInstance();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:FactoryTest.php


示例13: tearDown

 public function tearDown()
 {
     parent::tearDown();
     if ($this->tmpPath !== false) {
         unlink($this->tmpPath);
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:UploadVerifyFileTest.php


示例14: setUp

 function setUp()
 {
     parent::setUp();
     $memcMock = $this->getMock('MemcachedPhpBagOStuff', ['get', 'set'], [], '', false);
     $memcMock->expects($this->any())->method('get')->will($this->returnValue(false));
     $memcMock->expects($this->any())->method('set')->will($this->returnValue(true));
     $this->mockGlobalVariable('wgMemc', $memcMock);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:8,代码来源:NavigationModelTest.php


示例15: setUp

 function setUp()
 {
     global $wgAutoloadClasses, $IP;
     $wgAutoloadClasses['UnitTestController'] = dirname(__FILE__) . '/controllers/UnitTestController.class.php';
     $wgAutoloadClasses['UnitTestService'] = dirname(__FILE__) . '/controllers/UnitTestService.class.php';
     $wgAutoloadClasses['OasisTemplate'] = $IP . '/skins/Oasis.php';
     parent::setUp();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:8,代码来源:ControllerTest.php


示例16: setUp

 public function setUp()
 {
     $this->parser = new Parser();
     $title = Title::newFromText('test');
     $options = new ParserOptions();
     $this->parser->startExternalParse($title, $options, 'text', true);
     parent::setUp();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:8,代码来源:MediaWikiParserTest.php


示例17: setUp

 public function setUp()
 {
     $this->setupFile = dirname(__FILE__) . '/../CreateNewWiki_setup.php';
     parent::setUp();
     $userMock = $this->getMock('stdClass', array('getGroups'));
     $userMock->expects($this->any())->method('getGroups')->will($this->returnValue(array()));
     $this->mockGlobalVariable('wgUser', $userMock);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:8,代码来源:AutoCreateWiki_helperTest.php


示例18: setUp

 public function setUp()
 {
     $this->setupFile = __DIR__ . '/../Helios.setup.php';
     $this->webRequestMock = $this->getMock('\\WebRequest', ['getHeader', 'getCookie'], [], '', false);
     $this->mockGlobalVariable('wgHeliosLoginSamplingRate', 100);
     $this->mockGlobalVariable('wgHeliosLoginShadowMode', false);
     User::purgeAuthenticationCache();
     parent::setUp();
 }
开发者ID:yusufchang,项目名称:app,代码行数:9,代码来源:UserTest.php


示例19: tearDown

 public function tearDown()
 {
     parent::tearDown();
     global $wgStagingList;
     $wgStagingList = $this->org_StagingList;
     if (!empty($this->serverName)) {
         $_SERVER['SERVER_NAME'] = $this->serverName;
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:9,代码来源:WikiFactoryTest.php


示例20: setUp

 function setUp()
 {
     global $wgParser;
     $this->setupFile = __DIR__ . "/../MyHome.php";
     parent::setUp();
     if (empty($wgParser->mOptions)) {
         $wgParser->Options(new ParserOptions());
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:9,代码来源:MyHomeTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP WikiaSpecialPageController类代码示例发布时间:2022-05-23
下一篇:
PHP Wikia类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap