/** * @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()); }