예제 #1
0
 public function testRemovalResetsOffsetsCorrectly()
 {
     $node = new Node();
     $node->appendChild($a = new A());
     $b = new B($node);
     $node->prependChild($c = new C());
     $node->appendChild($d = new D());
     $a->remove();
     $this->assertSame([$c, $b, $d], $node->getChildren());
 }