當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WikiaBaseTest類代碼示例

本文整理匯總了PHP中WikiaBaseTest的典型用法代碼示例。如果您正苦於以下問題:PHP WikiaBaseTest類的具體用法?PHP WikiaBaseTest怎麽用?PHP WikiaBaseTest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了WikiaBaseTest類的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: 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


注:本文中的WikiaBaseTest類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。