本文整理汇总了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);
}
示例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);
}
示例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));
}
示例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);
}
示例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);
}
示例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());
}
示例7: flushCachesCallsTheFlushConfigurationCacheMethodOfConfigurationManager
/**
* @test
*/
public function flushCachesCallsTheFlushConfigurationCacheMethodOfConfigurationManager()
{
$this->mockConfigurationManager->expects($this->once())->method('flushConfigurationCache');
$this->cacheManager->flushCaches();
}