From 817d4c55d30685b0dbee464f5aa63664020a05ad Mon Sep 17 00:00:00 2001 From: Christian A. Weber Date: Mon, 23 Apr 2018 16:09:33 +0200 Subject: add unit tests for doctype --- tests/it_html.t | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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(), + "\n\n\n", + "html5 doctype" +); + # Test different html types foreach (array('html5' => "
", 'html' => "
", 'xhtml' => "
", 'xhtml-mobile' => "
") as $type => $value) { @@ -124,6 +130,12 @@ is( "empty h1 tag in xhtml context" ); +is( + html(), + "\n\n\n", + "xhtml doctype" +); + # XML generation unset($GLOBALS['it_html']); -- cgit v1.2.3