public function testGenerateHead() { $h = new HTML(); $h->doctype('html'); $html = $h->html('lang="en"'); $head = $html->head(); $base = $head->base('href="http://www.example.com/"'); $meta = $head->meta('charset="utf-8"'); $head->script('src="/js/app.js"'); $result = "<!DOCTYPE html>\n"; $result .= '<html lang="en">'; $result .= '<head>'; $result .= '<base href="http://www.example.com/">'; $result .= '<meta charset="utf-8">'; $result .= '<script src="/js/app.js"></script>'; $result .= '</head>'; $result .= '</html>'; $this->assertSame($result, $h->__toString()); }