本文整理汇总了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'));
}
示例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);
}
示例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);
}