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

PHP MediaWikiTestCase类代码示例

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

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



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

示例1: tearDown

 protected function tearDown()
 {
     $this->test_wrapper->destroyManuscriptsTest();
     unset($this->test_wrapper);
     unset($this->t);
     parent::tearDown();
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:7,代码来源:NewManuscriptWrapperTest.php


示例2: setUp

 protected function setUp()
 {
     global $wgFileBackends;
     parent::setUp();
     $tmpPrefix = wfTempDir() . '/filebackend-unittest-' . time() . '-' . mt_rand();
     if ($this->getCliArg('use-filebackend=')) {
         if (self::$backendToUse) {
             $this->singleBackend = self::$backendToUse;
         } else {
             $name = $this->getCliArg('use-filebackend=');
             $useConfig = array();
             foreach ($wgFileBackends as $conf) {
                 if ($conf['name'] == $name) {
                     $useConfig = $conf;
                     break;
                 }
             }
             $useConfig['name'] = 'localtesting';
             // swap name
             $useConfig['shardViaHashLevels'] = array('unittest-cont1' => array('levels' => 1, 'base' => 16, 'repeat' => 1));
             $class = $useConfig['class'];
             self::$backendToUse = new $class($useConfig);
             $this->singleBackend = self::$backendToUse;
         }
     } else {
         $this->singleBackend = new FSFileBackend(array('name' => 'localtesting', 'lockManager' => 'fsLockManager', 'containerPaths' => array('unittest-cont1' => "{$tmpPrefix}-localtesting-cont1", 'unittest-cont2' => "{$tmpPrefix}-localtesting-cont2")));
     }
     $this->multiBackend = new FileBackendMultiWrite(array('name' => 'localtesting', 'lockManager' => 'fsLockManager', 'parallelize' => 'implicit', 'backends' => array(array('name' => 'localmultitesting1', 'class' => 'FSFileBackend', 'lockManager' => 'nullLockManager', 'containerPaths' => array('unittest-cont1' => "{$tmpPrefix}-localtestingmulti1-cont1", 'unittest-cont2' => "{$tmpPrefix}-localtestingmulti1-cont2"), 'isMultiMaster' => false), array('name' => 'localmultitesting2', 'class' => 'FSFileBackend', 'lockManager' => 'nullLockManager', 'containerPaths' => array('unittest-cont1' => "{$tmpPrefix}-localtestingmulti2-cont1", 'unittest-cont2' => "{$tmpPrefix}-localtestingmulti2-cont2"), 'isMultiMaster' => true))));
     $this->filesToPrune = array();
 }
开发者ID:nischayn22,项目名称:mediawiki-core,代码行数:30,代码来源:FileBackendTest.php


示例3: setUp

 function setUp()
 {
     global $wgHooks;
     parent::setUp();
     Hooks::clear('MediaWikiHooksTest001');
     unset($wgHooks['MediaWikiHooksTest001']);
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:7,代码来源:HooksTest.php


示例4: setUp

 protected function setUp()
 {
     global $wgFileBackends;
     parent::setUp();
     $uniqueId = time() . '-' . mt_rand();
     $tmpDir = $this->getNewTempDirectory();
     if ($this->getCliArg('use-filebackend')) {
         if (self::$backendToUse) {
             $this->singleBackend = self::$backendToUse;
         } else {
             $name = $this->getCliArg('use-filebackend');
             $useConfig = array();
             foreach ($wgFileBackends as $conf) {
                 if ($conf['name'] == $name) {
                     $useConfig = $conf;
                     break;
                 }
             }
             $useConfig['name'] = 'localtesting';
             // swap name
             $useConfig['shardViaHashLevels'] = array('unittest-cont1' => array('levels' => 1, 'base' => 16, 'repeat' => 1));
             if (isset($useConfig['fileJournal'])) {
                 $useConfig['fileJournal'] = FileJournal::factory($useConfig['fileJournal'], $name);
             }
             $useConfig['lockManager'] = LockManagerGroup::singleton()->get($useConfig['lockManager']);
             $class = $useConfig['class'];
             self::$backendToUse = new $class($useConfig);
             $this->singleBackend = self::$backendToUse;
         }
     } else {
         $this->singleBackend = new FSFileBackend(array('name' => 'localtesting', 'lockManager' => LockManagerGroup::singleton()->get('fsLockManager'), 'wikiId' => wfWikiID(), 'containerPaths' => array('unittest-cont1' => "{$tmpDir}/localtesting-cont1", 'unittest-cont2' => "{$tmpDir}/localtesting-cont2")));
     }
     $this->multiBackend = new FileBackendMultiWrite(array('name' => 'localtesting', 'lockManager' => LockManagerGroup::singleton()->get('fsLockManager'), 'parallelize' => 'implicit', 'wikiId' => wfWikiId() . $uniqueId, 'backends' => array(array('name' => 'localmultitesting1', 'class' => 'FSFileBackend', 'containerPaths' => array('unittest-cont1' => "{$tmpDir}/localtestingmulti1-cont1", 'unittest-cont2' => "{$tmpDir}/localtestingmulti1-cont2"), 'isMultiMaster' => false), array('name' => 'localmultitesting2', 'class' => 'FSFileBackend', 'containerPaths' => array('unittest-cont1' => "{$tmpDir}/localtestingmulti2-cont1", 'unittest-cont2' => "{$tmpDir}/localtestingmulti2-cont2"), 'isMultiMaster' => true))));
 }
开发者ID:D66Ha,项目名称:mediawiki,代码行数:34,代码来源:FileBackendTest.php


示例5: tearDown

 protected function tearDown()
 {
     $this->database_test_instance_creator->destroyManuscriptsTest();
     unset($this->database_test_instance_creator);
     unset($this->t);
     parent::tearDown();
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:7,代码来源:ManuscriptDeskBaseWrapperTest.php


示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->setMwGlobals('wgShowEXIF', true);
     $this->filePath = __DIR__ . '/../../data/media/';
     $this->handler = new TiffHandler();
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:7,代码来源:TiffTest.php


示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $group = MessageGroupBase::factory($this->groupConfiguration);
     /** @var YamlFFS $ffs */
     $this->ffs = $group->getFFS();
 }
开发者ID:HuijiWiki,项目名称:mediawiki-extensions-Translate,代码行数:7,代码来源:RubyYamlFFSTest.php


示例8: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->cache1 = new HashBagOStuff();
     $this->cache2 = new HashBagOStuff();
     $this->cache = new MultiWriteBagOStuff(array('caches' => array($this->cache1, $this->cache2), 'replication' => 'async'));
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:7,代码来源:MultiWriteBagOStuffTest.php


示例9: setUp

 function setUp()
 {
     parent::setUp();
     require_once __DIR__ . '/../data/helpers/WellProtectedClass.php';
     $this->raw = new WellProtectedClass();
     $this->wrapped = TestingAccessWrapper::newFromObject($this->raw);
 }
开发者ID:D66Ha,项目名称:mediawiki,代码行数:7,代码来源:TestingAccessWrapperTest.php


示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->writeCache = new HashBagOStuff();
     $this->readCache = new HashBagOStuff();
     $this->cache = new ReplicatedBagOStuff(array('writeFactory' => $this->writeCache, 'readFactory' => $this->readCache));
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:7,代码来源:ReplicatedBagOStuffTest.php


示例11: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(['wgAllowUserJs' => false, 'wgDefaultLanguageVariant' => false, 'wgMetaNamespace' => 'Project']);
     $this->setUserLang('en');
     $this->setContentLang('en');
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:7,代码来源:TitleTest.php


示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     if (!CdbReader::haveExtension()) {
         $this->markTestSkipped('Native CDB support is not available');
     }
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:7,代码来源:CdbTest.php


示例13: tearDown

 public function tearDown()
 {
     global $wgShowEXIF, $wgEnableAutoRotation;
     $wgShowEXIF = $this->show;
     $wgEnableAutoRotation = $this->oldAuto;
     parent::tearDown();
 }
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:7,代码来源:ExifRotationTest.php


示例14: tearDown

 public function tearDown()
 {
     // turn off caching again.
     global $wgMainCacheType;
     $wgMainCacheType = $this->oldcache;
     parent::tearDown();
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:7,代码来源:ConcurrencyCheckTest.php


示例15: setUp

 protected function setUp()
 {
     global $wgGroupPermissions;
     parent::setUp();
     $this->stashMwGlobals(['wgGroupPermissions']);
     $wgGroupPermissions['local-id-lookup-test']['hideuser'] = true;
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:7,代码来源:LocalIdLookupTest.php


示例16: tearDown

 protected function tearDown()
 {
     unset($this->t);
     unset($this->context);
     parent::tearDown();
     return;
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:7,代码来源:SpecialNewManuscriptTest.php


示例17: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     parent::tearDownAfterClass();
     foreach (self::$startGlobals as $key => $value) {
         unset($GLOBALS[$key]);
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:7,代码来源:MediaWikiTestCaseTest.php


示例18: setUp

 protected function setUp()
 {
     if ($this->willSkipTests()) {
         $this->markTestSkipped('GeoData extension is required.');
     }
     parent::setUp();
 }
开发者ID:TU-Berlin,项目名称:WikidataMath,代码行数:7,代码来源:GeoDataDataUpdaterTest.php


示例19: __construct

 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->tablesUsed[] = 'page';
     $this->tablesUsed[] = 'revision';
     $this->tablesUsed[] = 'pagelinks';
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:7,代码来源:RefreshLinksPartitionTest.php


示例20: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->checkPHPExtension('exif');
     $this->mediaPath = __DIR__ . '/../../data/media/';
     $this->setMwGlobals('wgShowEXIF', true);
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:7,代码来源:ExifTest.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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