本文整理汇总了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();
}
示例2: tearDown
function tearDown()
{
global $wgDevelEnvironment, $wgDevelEnvironmentName;
$wgDevelEnvironment = $this->wgDevelEnv;
$wgDevelEnvironmentName = $this->wgDevelEnvName;
parent::tearDown();
}
示例3: tearDown
public function tearDown()
{
global $wgApiAccess, $wgApiEnvironment;
$wgApiAccess = $this->org_wgApiAccess;
$wgApiEnvironment = $this->org_wgApiEnvironment;
parent::tearDown();
}
示例4: setUp
public function setUp()
{
global $IP;
$this->setupFile = "{$IP}/extensions/wikia/JsonFormat/JsonFormat.setup.php";
$this->mockGlobalVariable('wgTitle', Title::newFromText('TestPageDoesNotExist'));
parent::setUp();
}
示例5: setUp
public function setUp()
{
$this->setupFile = dirname(__FILE__) . '/../ShareButtons.setup.php';
parent::setUp();
$this->mockGlobalVariable('wgTitle', Title::newMainPage());
$this->mockApp();
}
示例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]));
}
示例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]);
}
示例8: setUp
public function setUp()
{
$this->setupFile = __DIR__ . "/../AbPerformanceTesting.setup.php";
parent::setUp();
$this->mockGlobalVariable('wgCityId', 5123);
$this->mockGlobalFunction('wfGetBeaconId', '8gQHS-Q4_c');
}
示例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;
}
示例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();
}
示例11: tearDown
public function tearDown()
{
if (!empty($this->tmpFile)) {
unlink($this->tmpFile);
}
parent::tearDown();
}
示例12: setUp
public function setUp()
{
parent::setUp();
global $IP;
include_once $IP . '/includes/wikia/ui/Factory.class.php';
$this->instance = Wikia\UI\Factory::getInstance();
}
示例13: tearDown
public function tearDown()
{
parent::tearDown();
if ($this->tmpPath !== false) {
unlink($this->tmpPath);
}
}
示例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);
}
示例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();
}