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


PHP WikiaBaseTest::setUp方法代码示例

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


在下文中一共展示了WikiaBaseTest::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: setUp

 public function setUp()
 {
     global $wgDevelEnvironment;
     $this->org_wgDevelEnvironment = $wgDevelEnvironment;
     $wgDevelEnvironment = true;
     parent::setUp();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:TvApiControllerTest.php

示例3: 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

示例4: 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

示例5: 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

示例6: setUp

 protected function setUp()
 {
     $this->setupFile = dirname(__FILE__) . '/../PortableInfobox.setup.php';
     parent::setUp();
     $this->parser = $this->setUpParser();
     $this->controller = new PortableInfoboxParserTagController();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:PortableInfoboxParserTagControllerTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     global $wgCommandLineSilentMode;
     $this->silentMode = $wgCommandLineSilentMode;
     $wgCommandLineSilentMode = true;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:CityVisualizationTest.php

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: setUp

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

示例14: 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

示例15: 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


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