/** * @covers BackBee\NestedNode\Page::isLinkedToHisParentBy */ public function testIsLinkedToHisParentBy() { $this->assertFalse($this->page->isLinkedToHisParentBy($this->page->getContentSet()->first())); $this->assertFalse($this->page->isLinkedToHisParentBy($this->page->getContentSet()->last())); $this->assertFalse($this->page->isLinkedToHisParentBy(null)); $child = new Page('child', array('title' => 'child', 'url' => 'url')); $child->setParent($this->page)->setLayout($this->page->getLayout()); $this->assertFalse($child->isLinkedToHisParentBy($child->getContentSet()->first())); $this->assertTrue($child->isLinkedToHisParentBy($child->getContentSet()->last())); }