public function testPreviousSibling() { $parent = new Node(); $child = new Node(); $child2 = new Node(); $child->setParent($parent); $child2->setParent($parent); $this->assertEquals($child->id(), $child2->previousSibling()->id()); }
/** * @expectedException PHPHtmlParser\Exceptions\ParentNotFoundException */ public function testPreviousSiblingNoParent() { $child = new Node(); $child->previousSibling(); }