public function testRemoveAllChildrenRemoveParentReferences() { $root = new Node(); $root->addChild($child1 = new Node('child1'))->removeAllChildren(); $this->assertNull($child1->getParent()); }