/**
  * sprawdzanie czy nazwy się zgadzają
  */
 public function testName()
 {
     $el = new HtmlElement('head');
     $this->assertEquals('head', $el->name());
     $el->destroy($el);
     $el = new HtmlElement('link');
     $this->assertEquals('link', $el->name());
 }
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $output = $this->prologRender();
     preg_match('/<' . $this->root->name() . '.*?>/', $this->root->render(false, true), $result);
     $output .= isset($result[0]) ? str_replace(array("/>", " />"), ">", $result[0]) . PHP_EOL : '<' . $this->root->name() . '>' . PHP_EOL;
     $output .= $this->body;
     $output .= '</' . $this->root->name() . '>';
     return $output;
 }