Example #1
0
 /**
  * @param Node $parent
  * @param string $position
  * @return $this
  */
 public function appendTo(Node $parent, $position = Node::POSITION_LAST)
 {
     $parent->addChild($this, $position);
     return $this;
 }
Example #2
0
 function it_is_appendable_to_position(Node $parent)
 {
     $parent->addChild($this, Node::POSITION_FIRST)->shouldBeCalled();
     $this->appendTo($parent, Node::POSITION_FIRST)->shouldReturn($this);
 }