public function testGetAncestor() { $ancestor = $this->dateProperty->getAncestor(0); $this->assertNotNull($ancestor); $this->assertInstanceOf('PHPCR\\NodeInterface', $ancestor); $this->assertTrue($this->rootNode->isSame($ancestor)); $ancestor = $this->dateProperty->getAncestor(1); $this->assertNotNull($ancestor); $this->assertInstanceOf('PHPCR\\NodeInterface', $ancestor); $this->assertTrue($this->node->isSame($ancestor)); //self $ancestor = $this->dateProperty->getAncestor($this->dateProperty->getDepth()); $this->assertNotNull($ancestor); $this->assertInstanceOf('PHPCR\\PropertyInterface', $ancestor); $this->assertTrue($this->dateProperty->isSame($ancestor)); }