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


PHP ApiTestCase::apiUrl方法代码示例

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


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

示例1: 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', 'api_test_sysop@example.com', array('sysop')), 'uploader' => new TestUser('Apitestuser', 'Api Test User', 'api_test_user@example.com', array()));
     $this->setMwGlobals(array('wgAuth' => new StubObject('wgAuth', 'AuthPlugin'), 'wgRequest' => new FauxRequest(array()), 'wgUser' => self::$users['sysop']->user));
     $this->apiContext = new ApiTestContext();
 }
开发者ID:lourinaldi,项目名称:mediawiki,代码行数:11,代码来源:ApiTestCase.php

示例2: setUp

 protected function setUp()
 {
     global $wgServer, $wgDisableAuthManager;
     parent::setUp();
     self::$apiUrl = $wgServer . wfScript('api');
     ApiQueryInfo::resetTokenCache();
     // tokens are invalid because we cleared the session
     self::$users = ['sysop' => static::getTestSysop(), 'uploader' => static::getTestUser()];
     $this->setMwGlobals(['wgAuth' => $wgDisableAuthManager ? new AuthPlugin() : new MediaWiki\Auth\AuthManagerAuthPlugin(), 'wgRequest' => new FauxRequest([]), 'wgUser' => self::$users['sysop']->user]);
     $this->apiContext = new ApiTestContext();
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:11,代码来源:ApiTestCase.php

示例3: setUp

 function setUp()
 {
     global $wgContLang, $wgAuth, $wgMemc, $wgRequest, $wgUser, $wgServer;
     parent::setUp();
     self::$apiUrl = $wgServer . wfScript('api');
     $wgMemc = new EmptyBagOStuff();
     $wgContLang = Language::factory('en');
     $wgAuth = new StubObject('wgAuth', 'AuthPlugin');
     $wgRequest = new FauxRequest(array());
     self::$users = array('sysop' => new ApiTestUser('Apitestsysop', 'Api Test Sysop', 'api_test_sysop@sample.com', array('sysop')), 'uploader' => new ApiTestUser('Apitestuser', 'Api Test User', 'api_test_user@sample.com', array()));
     $wgUser = self::$users['sysop']->user;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:12,代码来源:ApiTestCase.php

示例4: setUp

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


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