public function testCanGoBackUpSeveralLevels() { $strong = Element::strong('foo'); $em = Element::em('bar'); $this->object->nest($strong, 'strong')->getChild('strong')->nest($em, 'em'); $child = $this->object->getChild('strong.em'); $this->assertEquals($child->getParent()->getParent(), $this->object); $this->assertEquals($child->getParent()->getParent(), $child->getParent(1)); }