public removeChild ( string $name ) : boolean | ||
$name | string | |
return | boolean |
public function removeChild($name)
{
foreach ($this->children as $key => $child) {
if ($child->appliesTo($name)) {
$child->setParentPath(null);
unset($this->children[$key]);
$this->updateModifications();
return true;
}
}
return false;
}
public function testNoIncludeFile() { /* * include file not found means output + empty $packages */ $this->root->removeChild('include'); $this->assertEmpty($this->selection->load()); }