Пример #1
0
 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());
 }
Пример #2
0
 /**
  * @expectedException PHPHtmlParser\Exceptions\ParentNotFoundException
  */
 public function testPreviousSiblingNoParent()
 {
     $child = new Node();
     $child->previousSibling();
 }