public function addHeadersStr($arr) { foreach ($arr as $key => $str) { $header = new Header(); $header->setContent($str); $this->addHeader($header); } }
/** * @covers Rvi\Html\Layout\Header::toHtml& */ public function testToHtml5() { $this->object->setContent("test content"); $this->object->setHtmlStandard(Header::HTML_STANDARD_HTML5); $strHtml = $this->object->toHtml("alert(\"onload\");"); $this->assertContains("<!DOCTYPE html>", $strHtml); $this->assertContains("<html", $strHtml); $this->assertContains("<title>", $strHtml); $this->assertContains("test content", $strHtml); }