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


PHP MediaWikiLangTestCase類代碼示例

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


在下文中一共展示了MediaWikiLangTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tearDown

 protected function tearDown()
 {
     global $wgHooks;
     $wgHooks['GetPreferences'] = $this->mOldGetPreferencesHooks;
     $this->mOldGetPreferencesHooks = false;
     parent::tearDown();
 }
開發者ID:Habatchii,項目名稱:wikibase-for-mediawiki,代碼行數:7,代碼來源:ApiOptionsTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     self::$notifyCallCounter = 0;
     self::$mockRecentChange = self::getMock('RecentChange');
     $this->setContentLang('qqx');
 }
開發者ID:claudinec,項目名稱:galan-wiki,代碼行數:7,代碼來源:CategoryMembershipChangeTest.php

示例3: setUp

 protected function setUp()
 {
     parent::setUp();
     $dbw = wfGetDB(DB_MASTER);
     $dbw->replace('interwiki', ['iw_prefix'], ['iw_prefix' => 'linksupdatetest', 'iw_url' => 'http://testing.com/wiki/$1', 'iw_api' => 'http://testing.com/w/api.php', 'iw_local' => 0, 'iw_trans' => 0, 'iw_wikiid' => 'linksupdatetest']);
     $this->setMwGlobals('wgRCWatchCategoryMembership', true);
 }
開發者ID:claudinec,項目名稱:galan-wiki,代碼行數:7,代碼來源:LinksUpdateTest.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     // Avoid 'GetHumanTimestamp' hook and others
     $this->setMwGlobals('wgHooks', array());
     RequestContext::getMain()->setLanguage(Language::factory('en'));
 }
開發者ID:MediaWiki-stable,項目名稱:1.26.1,代碼行數:7,代碼來源:MWTimestampTest.php

示例5: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->initMessagesHref();
     $this->skin = new SkinTemplate();
     $this->skin->getContext()->setLanguage(Language::factory('en'));
 }
開發者ID:MediaWiki-stable,項目名稱:1.26.1,代碼行數:7,代碼來源:SideBarTest.php

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     if (!extension_loaded('intl')) {
         $this->markTestSkipped('These tests require intl extension');
     }
 }
開發者ID:mangowi,項目名稱:mediawiki,代碼行數:7,代碼來源:CollationTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $langObj = Language::factory('en');
     $localZone = 'UTC';
     $localOffset = date('Z') / 60;
     $this->setMwGlobals(array('wgMemc' => new EmptyBagOStuff(), 'wgContLang' => $langObj, 'wgLang' => $langObj, 'wgLocaltimezone' => $localZone, 'wgLocalTZoffset' => $localOffset, 'wgNamespaceProtection' => array(NS_MEDIAWIKI => 'editinterface')));
     $this->userName = 'Useruser';
     $this->altUserName = 'Altuseruser';
     date_default_timezone_set($localZone);
     $this->title = Title::makeTitle(NS_MAIN, "Main Page");
     if (!isset($this->userUser) || !$this->userUser instanceof User) {
         $this->userUser = User::newFromName($this->userName);
         if (!$this->userUser->getID()) {
             $this->userUser = User::createNew($this->userName, array("email" => "test@example.com", "real_name" => "Test User"));
             $this->userUser->load();
         }
         $this->altUser = User::newFromName($this->altUserName);
         if (!$this->altUser->getID()) {
             $this->altUser = User::createNew($this->altUserName, array("email" => "alttest@example.com", "real_name" => "Test User Alt"));
             $this->altUser->load();
         }
         $this->anonUser = User::newFromId(0);
         $this->user = $this->userUser;
     }
 }
開發者ID:nischayn22,項目名稱:mediawiki-core,代碼行數:26,代碼來源:TitlePermissionTest.php

示例8: setUp

 function setUp()
 {
     global $wgDefaultUserOptions;
     parent::setUp();
     //ensure the correct default gender
     $wgDefaultUserOptions['gender'] = 'unknown';
 }
開發者ID:Jobava,項目名稱:diacritice-meta-repo,代碼行數:7,代碼來源:GenderCacheTest.php

示例9: tearDown

 function tearDown()
 {
     global $wgMemc;
     unset($wgMemc);
     unset($this->lc);
     unset($this->lang);
     parent::tearDown();
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:8,代碼來源:LanguageConverterTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $conf = new SiteConfiguration();
     $conf->settings = array('wgServer' => array('enwiki' => 'http://en.example.org', 'ruwiki' => '//ru.example.org'), 'wgArticlePath' => array('enwiki' => '/w/$1', 'ruwiki' => '/wiki/$1'));
     $conf->suffixes = array('wiki');
     $this->setMwGlobals(array('wgConf' => $conf));
 }
開發者ID:rugby110,項目名稱:mediawiki,代碼行數:8,代碼來源:WikiMapTest.php

示例11: tearDown

 public function tearDown()
 {
     global $wgContLang, $wgLang, $wgLanguageCode;
     $wgLang = self::$oldLang;
     $wgContLang = self::$oldContLang;
     $wgLanguageCode = $wgContLang->getCode();
     self::$oldContLang = self::$oldLang = null;
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:8,代碼來源:MediaWikiLangTestCase.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $user = User::newFromName('UserThatExists');
     if (!$user->getId()) {
         $user->addToDatabase();
     }
 }
開發者ID:felixonmars,項目名稱:mediawiki-extensions-MobileFrontend,代碼行數:8,代碼來源:SpecialUserProfileTest.php

示例13: teardown

 public function teardown()
 {
     global $wgHooks;
     // restore hooks that force custom rendering
     if ($this->savedContentGetParserOutput !== null) {
         $wgHooks['ContentGetParserOutput'] = $this->savedContentGetParserOutput;
     }
     parent::teardown();
 }
開發者ID:Habatchii,項目名稱:wikibase-for-mediawiki,代碼行數:9,代碼來源:TextContentTest.php

示例14: tearDown

 protected function tearDown()
 {
     global $wgContLang;
     parent::tearDown();
     MWNamespace::getCanonicalNamespaces(true);
     # reset namespace cache
     $wgContLang->resetNamespaces();
     # reset namespace cache
 }
開發者ID:MediaWiki-stable,項目名稱:1.26.1,代碼行數:9,代碼來源:TitleMethodsTest.php

示例15: tearDown

 public function tearDown()
 {
     global $wgHooks;
     if ($this->mOldGetPreferencesHooks !== false) {
         $wgHooks['GetPreferences'] = $this->mOldGetPreferencesHooks;
         $this->mOldGetPreferencesHooks = false;
     }
     parent::tearDown();
 }
開發者ID:Jobava,項目名稱:diacritice-meta-repo,代碼行數:9,代碼來源:ApiOptionsTest.php


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