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


PHP NodeTypeManager::expects方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     $this->mockWorkspace = $this->getMock('TYPO3\\TYPO3CR\\Domain\\Model\\Workspace', array(), array(), '', FALSE);
     $this->mockNodeType = $this->getMock('TYPO3\\TYPO3CR\\Domain\\Model\\NodeType', array(), array(), '', FALSE);
     $this->mockNodeTypeManager = $this->getMock('TYPO3\\TYPO3CR\\Domain\\Service\\NodeTypeManager', array(), array(), '', FALSE);
     $this->mockNodeTypeManager->expects($this->any())->method('getNodeType')->will($this->returnValue($this->mockNodeType));
     $this->nodeData = $this->getAccessibleMock('TYPO3\\TYPO3CR\\Domain\\Model\\NodeData', array('dummy'), array('/foo/bar', $this->mockWorkspace));
     $this->nodeData->_set('nodeTypeManager', $this->mockNodeTypeManager);
     $this->nodeData->_set('nodeDataRepository', $this->getMock('TYPO3\\Flow\\Persistence\\RepositoryInterface'));
 }
开发者ID:radmiraal,项目名称:TYPO3.TYPO3CR,代码行数:10,代码来源:NodeDataTest.php

示例2: setUp

 public function setUp()
 {
     $this->mockWorkspace = $this->getMockBuilder('TYPO3\\TYPO3CR\\Domain\\Model\\Workspace')->disableOriginalConstructor()->getMock();
     $this->nodeData = $this->getAccessibleMock('TYPO3\\TYPO3CR\\Domain\\Model\\NodeData', array('addOrUpdate'), array('/foo/bar', $this->mockWorkspace));
     $this->mockNodeType = $this->getMockBuilder('TYPO3\\TYPO3CR\\Domain\\Model\\NodeType')->disableOriginalConstructor()->getMock();
     $this->mockNodeTypeManager = $this->getMockBuilder('TYPO3\\TYPO3CR\\Domain\\Service\\NodeTypeManager')->disableOriginalConstructor()->getMock();
     $this->mockNodeTypeManager->expects($this->any())->method('getNodeType')->will($this->returnValue($this->mockNodeType));
     $this->mockNodeTypeManager->expects($this->any())->method('hasNodeType')->will($this->returnValue(true));
     $this->inject($this->nodeData, 'nodeTypeManager', $this->mockNodeTypeManager);
     $this->mockNodeDataRepository = $this->getMockBuilder('TYPO3\\TYPO3CR\\Domain\\Repository\\NodeDataRepository')->disableOriginalConstructor()->getMock();
     $this->inject($this->nodeData, 'nodeDataRepository', $this->mockNodeDataRepository);
 }
开发者ID:hhoechtl,项目名称:neos-development-collection,代码行数:12,代码来源:NodeDataTest.php

示例3: setUp

 public function setUp()
 {
     $this->mockWorkspace = $this->getMockBuilder(Workspace::class)->disableOriginalConstructor()->getMock();
     $this->nodeData = $this->getAccessibleMock(NodeData::class, array('addOrUpdate'), array('/foo/bar', $this->mockWorkspace));
     $this->mockNodeType = $this->getMockBuilder(NodeType::class)->disableOriginalConstructor()->getMock();
     $this->mockNodeTypeManager = $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock();
     $this->mockNodeTypeManager->expects($this->any())->method('getNodeType')->will($this->returnValue($this->mockNodeType));
     $this->mockNodeTypeManager->expects($this->any())->method('hasNodeType')->will($this->returnValue(true));
     $this->inject($this->nodeData, 'nodeTypeManager', $this->mockNodeTypeManager);
     $this->mockNodeDataRepository = $this->getMockBuilder(NodeDataRepository::class)->disableOriginalConstructor()->getMock();
     $this->inject($this->nodeData, 'nodeDataRepository', $this->mockNodeDataRepository);
 }
开发者ID:robertlemke,项目名称:neos-development-collection,代码行数:12,代码来源:NodeDataTest.php


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