summaryrefslogtreecommitdiff
path: root/tests/it_html.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/it_html.t')
-rwxr-xr-xtests/it_html.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/it_html.t b/tests/it_html.t
index bcfd40d..8e529e0 100755
--- a/tests/it_html.t
+++ b/tests/it_html.t
@@ -7,7 +7,7 @@ it::getopt(""); #handle possible --debug parameter
# Traditional html5 generation
ini_set('default_charset', "utf-8");
-new it_html(array('htmltype' => "html"));
+new it_html(array('htmltype' => "html5", 'prettyprint' => false));
is(
a(array('href' => "&foo", 'true' => true, 'false' => false, 'null' => null, 'empty' => ""), "bar"),
@@ -100,6 +100,12 @@ is(
"use html entities in attributes but not in normal text"
);
+is(
+ html(),
+ "<!DOCTYPE html>\n<html lang=\"de\">\n</html>\n",
+ "html5 doctype"
+);
+
# Test different html types
foreach (array('html5' => "<br flag>", 'html' => "<br flag>", 'xhtml' => "<br flag=\"flag\" />", 'xhtml-mobile' => "<br flag=\"flag\" />") as $type => $value)
{
@@ -124,6 +130,12 @@ is(
"empty h1 tag in xhtml context"
);
+is(
+ html(),
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"de\">\n</html>\n",
+ "xhtml doctype"
+);
+
# XML generation
unset($GLOBALS['it_html']);