本文整理汇总了PHP中WikiaBaseTest::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP WikiaBaseTest::setUp方法的具体用法?PHP WikiaBaseTest::setUp怎么用?PHP WikiaBaseTest::setUp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WikiaBaseTest
的用法示例。
在下文中一共展示了WikiaBaseTest::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
$dir = dirname(__FILE__) . '/../../../';
global $wgAutoloadClasses;
$this->setupFile = $dir . 'HubRssFeed.setup.php';
parent::setUp();
}
示例2: setUp
public function setUp()
{
global $wgDevelEnvironment;
$this->org_wgDevelEnvironment = $wgDevelEnvironment;
$wgDevelEnvironment = true;
parent::setUp();
}
示例3: 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]));
}
示例4: setUp
public function setUp()
{
parent::setUp();
global $IP;
include_once $IP . '/includes/wikia/ui/Factory.class.php';
$this->instance = Wikia\UI\Factory::getInstance();
}
示例5: setUp
public function setUp()
{
$this->setupFile = __DIR__ . "/../AbPerformanceTesting.setup.php";
parent::setUp();
$this->mockGlobalVariable('wgCityId', 5123);
$this->mockGlobalFunction('wfGetBeaconId', '8gQHS-Q4_c');
}
示例6: setUp
protected function setUp()
{
$this->setupFile = dirname(__FILE__) . '/../PortableInfobox.setup.php';
parent::setUp();
$this->parser = $this->setUpParser();
$this->controller = new PortableInfoboxParserTagController();
}
示例7: setUp
public function setUp()
{
parent::setUp();
global $wgCommandLineSilentMode;
$this->silentMode = $wgCommandLineSilentMode;
$wgCommandLineSilentMode = true;
}
示例8: 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();
}
示例9: setUp
public function setUp()
{
global $IP;
$this->setupFile = "{$IP}/extensions/wikia/JsonFormat/JsonFormat.setup.php";
$this->mockGlobalVariable('wgTitle', Title::newFromText('TestPageDoesNotExist'));
parent::setUp();
}
示例10: setUp
public function setUp()
{
$this->setupFile = dirname(__FILE__) . '/../ShareButtons.setup.php';
parent::setUp();
$this->mockGlobalVariable('wgTitle', Title::newMainPage());
$this->mockApp();
}
示例11: 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]);
}
示例12: 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;
}
示例13: setUp
public function setUp()
{
$dir = dirname(__FILE__) . '/../';
$this->setupFile = $dir . 'POI.setup.php';
$this->tmpFile = tempnam('/tmp', __CLASS__);
parent::setUp();
}
示例14: setUp
public function setUp()
{
$this->parser = new Parser();
$title = Title::newFromText('test');
$options = new ParserOptions();
$this->parser->startExternalParse($title, $options, 'text', true);
parent::setUp();
}
示例15: setUp
public function setUp()
{
$this->setupFile = dirname(__FILE__) . '/../CreateNewWiki_setup.php';
parent::setUp();
$userMock = $this->getMock('stdClass', array('getGroups'));
$userMock->expects($this->any())->method('getGroups')->will($this->returnValue(array()));
$this->mockGlobalVariable('wgUser', $userMock);
}