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

PHP MediaWikiLangTestCase类代码示例

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

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



在下文中一共展示了MediaWikiLangTestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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" => "[email protected]", "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" => "[email protected]", "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


示例16: setUp

 public function setUp()
 {
     parent::setUp();
     $conf = new SiteConfiguration();
     $conf->settings = ['wgServer' => ['enwiki' => 'http://en.example.org', 'ruwiki' => '//ru.example.org'], 'wgArticlePath' => ['enwiki' => '/w/$1', 'ruwiki' => '/wiki/$1']];
     $conf->suffixes = ['wiki'];
     $this->setMwGlobals(['wgConf' => $conf]);
     TestSites::insertIntoDb();
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:9,代码来源:WikiMapTest.php


示例17: setUp

 protected function setUp()
 {
     parent::setUp();
     if (!$this->isWikitextNS(NS_MAIN)) {
         $this->markTestSkipped('Main namespace does not support wikitext.');
     }
     // Avoid special pages from extensions interferring with the tests
     $this->setMwGlobals('wgSpecialPages', array());
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:9,代码来源:PrefixSearchTest.php


示例18: setUp

 /**
  * Default set up function.
  *
  * Clears $wgUser, and reports errors from addDBData to PHPUnit
  */
 protected function setUp()
 {
     parent::setUp();
     // Check if any Exception is stored for rethrowing from addDBData
     // @see self::exceptionFromAddDBData
     if ($this->exceptionFromAddDBData !== null) {
         throw $this->exceptionFromAddDBData;
     }
     $this->setMwGlobals('wgUser', new User());
 }
开发者ID:Habatchii,项目名称:wikibase-for-mediawiki,代码行数:15,代码来源:DumpTestCase.php


示例19: tearDown

 protected function tearDown()
 {
     // Avoid leaking session over tests
     if (session_id() != '') {
         global $wgUser;
         $wgUser->logout();
         session_destroy();
     }
     parent::tearDown();
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:10,代码来源:ApiTestCase.php


示例20: setUp

 protected function setUp()
 {
     global $wgServer;
     parent::setUp();
     self::$apiUrl = $wgServer . wfScript('api');
     ApiQueryInfo::resetTokenCache();
     // tokens are invalid because we cleared the session
     self::$users = array('sysop' => new TestUser('Apitestsysop', 'Api Test Sysop', '[email protected]', array('sysop')), 'uploader' => new TestUser('Apitestuser', 'Api Test User', '[email protected]', array()));
     $this->setMwGlobals(array('wgMemc' => new EmptyBagOStuff(), 'wgAuth' => new StubObject('wgAuth', 'AuthPlugin'), 'wgRequest' => new FauxRequest(array()), 'wgUser' => self::$users['sysop']->user));
     $this->apiContext = new ApiTestContext();
 }
开发者ID:Habatchii,项目名称:wikibase-for-mediawiki,代码行数:11,代码来源:ApiTestCase.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP MediaWikiTestCase类代码示例发布时间:2022-05-23
下一篇:
PHP MediaUtils类代码示例发布时间: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