public function testRemove() { $root = new RootNode(); $parent_one = $this->createParentNode(); $parent_one->appendTo($root); $one = $this->createNode(); $one->appendTo($parent_one); $two = $this->createNode(); $two->appendTo($parent_one); $parent_two = $this->createParentNode(); $parent_two->appendTo($root); $first = $this->createNode(); $first->appendTo($parent_two); $second = $this->createNode(); $second->appendTo($parent_two); $collection = new NodeCollection([$one, $first], FALSE); $collection->remove(); $this->assertEquals(1, $parent_one->childCount()); $this->assertEquals(1, $parent_two->childCount()); }