Ejemplo n.º 1
0
 /**
  * wstawianie kodu html
  */
 public function testInsertHtml()
 {
     $el = new HtmlElement('head');
     $el->insertHtml('<span class="ma">ma </span>');
     $el->insertHtml('<span class="ala">Ala </span>', $el::CHILD_PREPEND);
     $el->insertHtml('<span class="kota">kota</span>', $el::CHILD_APPEND);
     $span = $el->xpath('span');
     $this->assertEquals('ala', $span->item(0)->getAttribute('class'));
     $this->assertEquals('ma', $span->item(1)->getAttribute('class'));
     $this->assertEquals('kota', $span->item(2)->getAttribute('class'));
     $el->destroy($el);
 }