public function testSiblings() { $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(null, $c->getPreviousSibling()); $this->assertSame($b, $c->getNextSibling()); $this->assertSame(null, $d->getNextSibling()); $this->assertSame($b, $d->getPreviousSibling()); $this->assertSame($c, $b->getPreviousSibling()); $this->assertSame($d, $b->getNextSibling()); }