getNodeName() public method

public getNodeName ( )
Beispiel #1
0
 public function testGetNodeNameForInternalLink()
 {
     $metadata = $this->prophesize(StructureMetadata::class);
     $inspector = $this->prophesize(DocumentInspector::class);
     $propertyFactory = $this->prophesize(LegacyPropertyFactory::class);
     $redirectDocument = $this->prophesize(BasePageDocument::class);
     $redirectDocument->getTitle()->willReturn('test');
     $document = $this->prophesize(BasePageDocument::class);
     $document->getTitle()->shouldNotBeCalled();
     $document->getRedirectType()->willReturn(RedirectType::INTERNAL);
     $document->getRedirectTarget()->willReturn($redirectDocument->reveal());
     $structure = new StructureBridge($metadata->reveal(), $inspector->reveal(), $propertyFactory->reveal(), $document->reveal());
     $this->assertEquals('test', $structure->getNodeName());
 }