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


PHP ConfigurationManager::expects方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     $this->nodeTypeManager = new NodeTypeManager();
     $this->mockConfigurationManager = $this->getMockBuilder(ConfigurationManager::class)->disableOriginalConstructor()->getMock();
     $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($this->nodeTypesFixture));
     $this->inject($this->nodeTypeManager, 'configurationManager', $this->mockConfigurationManager);
 }
开发者ID:testbird,项目名称:neos-development-collection,代码行数:7,代码来源:NodeTypeManagerTest.php

示例2: handleStoresRouterMatchResultsInTheComponentContext

 /**
  * @test
  */
 public function handleStoresRouterMatchResultsInTheComponentContext()
 {
     $mockMatchResults = array('someRouterMatchResults');
     $this->mockConfigurationManager->expects($this->atLeastOnce())->method('getConfiguration')->will($this->returnValue(array()));
     $this->mockRouter->expects($this->atLeastOnce())->method('route')->with($this->mockHttpRequest)->will($this->returnValue($mockMatchResults));
     $this->mockComponentContext->expects($this->atLeastOnce())->method('setParameter')->with('TYPO3\\Flow\\Mvc\\Routing\\RoutingComponent', 'matchResults', $mockMatchResults);
     $this->routingComponent->handle($this->mockComponentContext);
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:11,代码来源:RoutingComponentTest.php

示例3: setUp

 public function setUp($nodeTypesFixture = NULL)
 {
     if ($nodeTypesFixture === NULL) {
         $nodeTypesFixture = $this->nodeTypesFixture;
     }
     $this->configurationManager = $this->getMockBuilder('TYPO3\\Flow\\Configuration\\ConfigurationManager')->disableOriginalConstructor()->getMock();
     $this->configurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($nodeTypesFixture));
 }
开发者ID:radmiraal,项目名称:TYPO3.TYPO3CR,代码行数:8,代码来源:NodeTypeManagerTest.php

示例4: prepareNodeTypeManager

 /**
  * Prepares $this->nodeTypeManager with a fresh instance with all mocks and makes the given fixture data available as NodeTypes configuration
  *
  * @param array $nodeTypesFixtureData
  */
 protected function prepareNodeTypeManager(array $nodeTypesFixtureData)
 {
     $this->nodeTypeManager = new NodeTypeManager();
     $this->mockConfigurationManager = $this->getMockBuilder(ConfigurationManager::class)->disableOriginalConstructor()->getMock();
     $mockCache = $this->getMock(\TYPO3\Flow\Cache\Frontend\StringFrontend::class, [], [], '', false);
     $mockCache->expects($this->any())->method('get')->willReturn(null);
     $this->inject($this->nodeTypeManager, 'fullConfigurationCache', $mockCache);
     $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($nodeTypesFixtureData));
     $this->inject($this->nodeTypeManager, 'configurationManager', $this->mockConfigurationManager);
 }
开发者ID:mgoldbeck,项目名称:neos-development-collection,代码行数:15,代码来源:NodeTypeManagerTest.php

示例5: setUp

 public function setUp()
 {
     $this->policyService = new PolicyService();
     $this->mockConfigurationManager = $this->getMockBuilder(ConfigurationManager::class)->disableOriginalConstructor()->getMock();
     $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->with(ConfigurationManager::CONFIGURATION_TYPE_POLICY)->will($this->returnCallback(function () {
         return $this->mockPolicyConfiguration;
     }));
     $this->inject($this->policyService, 'configurationManager', $this->mockConfigurationManager);
     $this->mockObjectManager = $this->getMockBuilder(ObjectManager::class)->disableOriginalConstructor()->getMock();
     $this->inject($this->policyService, 'objectManager', $this->mockObjectManager);
     $this->mockPrivilege = $this->getAccessibleMock(AbstractPrivilege::class, ['matchesSubject'], [], '', false);
 }
开发者ID:cerlestes,项目名称:flow-development-collection,代码行数:12,代码来源:PolicyServiceTest.php

示例6: flushConfigurationCachesByChangedFilesFlushesConfigurationCache

 /**
  * @test
  */
 public function flushConfigurationCachesByChangedFilesFlushesConfigurationCache()
 {
     $this->registerCache('Flow_Object_Classes');
     $this->registerCache('Flow_Object_Configuration');
     $this->mockConfigurationManager->expects($this->once())->method('flushConfigurationCache');
     $this->cacheManager->flushSystemCachesByChangedFiles('Flow_ConfigurationFiles', array());
 }
开发者ID:nlx-sascha,项目名称:flow-development-collection,代码行数:10,代码来源:CacheManagerTest.php

示例7: flushCachesCallsTheFlushConfigurationCacheMethodOfConfigurationManager

 /**
  * @test
  */
 public function flushCachesCallsTheFlushConfigurationCacheMethodOfConfigurationManager()
 {
     $this->mockConfigurationManager->expects($this->once())->method('flushConfigurationCache');
     $this->cacheManager->flushCaches();
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:8,代码来源:CacheManagerTest.php


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