Adds new child at the end of the children.
public appendChild ( |
||
$nodes | The appended child | |
return |
public function testAppendChild() { $list = new Element('ul'); $this->assertCount(0, $list->find('li')); $node = new Element('li', 'foo'); $list->appendChild($node); $this->assertCount(1, $list->find('li')); $items = []; $items[] = new Element('li', 'bar'); $items[] = new Element('li', 'baz'); $list->appendChild($items); $this->assertCount(3, $list->find('li')); }