Creates, adds and returns a child node of this node. Also sets default
properties and creates default subnodes.
public createNodeData ( string $name, |
||
$name | string | Name of the new node |
$nodeType | Node type of the new node (optional) | |
$identifier | string | The identifier of the node, unique within the workspace, optional(!) |
$workspace | ||
$dimensions | array | |
return |
/** * @test */ public function createNodeCreatesNodeDataWithExplicitWorkspaceIfGiven() { /** @var NodeDataRepository|\PHPUnit_Framework_MockObject_MockObject $nodeDataRepository */ $nodeDataRepository = $this->createMock(NodeDataRepository::class); $this->inject($this->nodeData, 'nodeDataRepository', $nodeDataRepository); $nodeDataRepository->expects($this->atLeastOnce())->method('setNewIndex'); $this->nodeData->createNodeData('foo', null, null, $this->mockWorkspace); }