public function removeAt($index) { $item = parent::removeAt($index); if ($item instanceof TXmlElement) { $item->setParent(null); } return $item; }
public function testRemoveAt() { $element = new TXmlElement('tag'); $list = new TXmlElementList($element); $newElement = new TXmlElement('newTag'); $list->insertAt(0, $newElement); self::assertEquals($newElement, $list->removeAt(0)); }