getIdentifier() public method

Returns the identifier of this node
public getIdentifier ( ) : string
return string the node's UUID (unique within the workspace)
コード例 #1
0
 /**
  * @test
  */
 public function getIdentifierReturnsTheIdentifier()
 {
     $nodeData = $this->getMockBuilder(NodeData::class)->disableOriginalConstructor()->getMock();
     $nodeData->expects($this->once())->method('getIdentifier')->will($this->returnValue('theidentifier'));
     $context = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();
     $contextualizedNode = new Node($nodeData, $context);
     $this->assertEquals('theidentifier', $contextualizedNode->getIdentifier());
 }