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


PHP F::unsetInstance方法代码示例

本文整理汇总了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();
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:7,代码来源:WikiaBaseTest.class.php

示例2: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     F::unsetInstance('User');
     F::unsetInstance('WebRequest');
     F::unsetInstance('Title');
     global $wgTitle;
     unset($wgTitle);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:8,代码来源:WikiaPollTest.php

示例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);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:9,代码来源:JSSnippetsTest.php

示例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);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:9,代码来源:UserLoginTest.php

示例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');
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:12,代码来源:ImageReviewTest.php

示例6: tearDown

 protected function tearDown()
 {
     global $wgCityId;
     $wgCityId = $this->wgCityId;
     F::unsetInstance('FounderProgressBarController');
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:6,代码来源:FounderProgressBarTest.php

示例7: tearDown

 public function tearDown()
 {
     F::unsetInstance('GlobalTitle');
     F::unsetInstance('ScavengerHuntGames');
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:5,代码来源:ScavengerHuntTest.php

示例8: tearDownToggleFeature

 protected function tearDownToggleFeature()
 {
     global $wgWikicitiesReadOnly;
     $wgWikicitiesReadOnly = $this->wgWikicitiesReadOnly_org;
     F::unsetInstance('LogPage');
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:6,代码来源:WikiFeaturesTest.php

示例9: tearDownGetStatsMock

 protected function tearDownGetStatsMock()
 {
     F::unsetInstance('QuickStatsController');
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:4,代码来源:AdminDashboardTest.php

示例10: tearDown

 protected function tearDown()
 {
     F::unsetInstance('Category');
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:4,代码来源:WikiaQuizTest.php


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