本文整理汇总了PHP中F::unsetInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP F::unsetInstance方法的具体用法?PHP F::unsetInstance怎么用?PHP F::unsetInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类F
的用法示例。
在下文中一共展示了F::unsetInstance方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unsetClassInstances
private function unsetClassInstances()
{
foreach ($this->mockedClasses as $className) {
F::unsetInstance($className);
}
$this->mockedClasses = array();
}
示例2: tearDownAfterClass
public static function tearDownAfterClass()
{
F::unsetInstance('User');
F::unsetInstance('WebRequest');
F::unsetInstance('Title');
global $wgTitle;
unset($wgTitle);
}
示例3: testAddToStack
public function testAddToStack()
{
F::unsetInstance('JSSnippets');
$instance = F::build('JSSnippets');
$snippet = $instance->addToStack(array('/extensions/wikia/Feature/js/Feature.js', '/extensions/wikia/Feature/css/Feature.css'));
$this->assertEquals('<script>JSSnippetsStack.push({dependencies:["/extensions/wikia/Feature/js/Feature.js","/extensions/wikia/Feature/css/Feature.css"]})</script>', $snippet);
$snippet = $instance->addToStack(array('/extensions/wikia/Feature/js/Feature.js'), array('$.loadJQueryUI'), 'Feature.init', array('foo' => 'bar'));
$this->assertEquals('<script>JSSnippetsStack.push({dependencies:["/extensions/wikia/Feature/js/Feature.js"],getLoaders:function(){return [$.loadJQueryUI]},callback:function(json){Feature.init(json)},id:"Feature.init",options:{"foo":"bar"}})</script>', $snippet);
}
示例4: setUpRequest
protected function setUpRequest($params = array())
{
F::unsetInstance('WebRequest');
$wgRequest = F::build('WebRequest', $params);
foreach ($params as $key => $value) {
$wgRequest->setVal($key, $value);
}
$this->mockGlobalVariable('wgRequest', $wgRequest);
}
示例5: testImageReviewSpecialControllerIndexError
public function testImageReviewSpecialControllerIndexError()
{
$this->setStubsForImageReviewSpecialControllerTests(true);
$this->mockApp();
$response = $this->app->sendRequest('ImageReviewSpecialController', 'index', array());
$imagesList = $response->getVal('imageList');
$this->assertInternalType('array', $imagesList);
$this->assertEquals($this->fakeWrongImages, $imagesList);
F::unsetInstance('SpecialPage');
F::unsetInstance('ImageReviewHelper');
F::unsetInstance('ImageReviewSpecialController');
}
示例6: tearDown
protected function tearDown()
{
global $wgCityId;
$wgCityId = $this->wgCityId;
F::unsetInstance('FounderProgressBarController');
}
示例7: tearDown
public function tearDown()
{
F::unsetInstance('GlobalTitle');
F::unsetInstance('ScavengerHuntGames');
}
示例8: tearDownToggleFeature
protected function tearDownToggleFeature()
{
global $wgWikicitiesReadOnly;
$wgWikicitiesReadOnly = $this->wgWikicitiesReadOnly_org;
F::unsetInstance('LogPage');
}
示例9: tearDownGetStatsMock
protected function tearDownGetStatsMock()
{
F::unsetInstance('QuickStatsController');
}
示例10: tearDown
protected function tearDown()
{
F::unsetInstance('Category');
}