From: Nuno Lopes
Date: Sat, 20 Jan 2007 12:50:19 +0000 (+0000)
Subject: new tests. bump code coverage to 81%
X-Git-Tag: RELEASE_1_2_3~34
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65975bfc15a5acea12ee6ddb86ab3482c2279d04;p=php
new tests. bump code coverage to 81%
---
diff --git a/ext/tidy/tests/024.phpt b/ext/tidy/tests/024.phpt
new file mode 100644
index 0000000000..c3d08cd6ea
--- /dev/null
+++ b/ext/tidy/tests/024.phpt
@@ -0,0 +1,41 @@
+--TEST--
+libtidy handling of 'new-blocklevel-tags'
+--SKIPIF--
+
+--FILE--
+
+
+
+
+';
+
+$config = array(
+'new-blocklevel-tags' => 'wps:block,wps:var,wps:value'
+);
+
+$tidy = tidy_parse_string($contents, $config, 'utf8');
+$tidy->cleanRepair();
+
+var_dump($tidy->value);
+
+?>
+--EXPECT--
+string(117) "
+
+
+
+
+
+
+
+
+
+"
diff --git a/ext/tidy/tests/025.phpt b/ext/tidy/tests/025.phpt
new file mode 100644
index 0000000000..a7bd544d67
--- /dev/null
+++ b/ext/tidy/tests/025.phpt
@@ -0,0 +1,50 @@
+--TEST--
+tidyNode tests
+--SKIPIF--
+
+--FILE--
+isPhp());
+var_dump($node->isText());
+var_dump($node->isComment());
+var_dump($node->hasSiblings());
+var_dump((string)$node);
+
+$tidy=tidy_parse_string('<% %>');
+var_dump($tidy->Root()->child[0]->isAsp());
+
+$tidy=tidy_parse_string('<# #>');
+var_dump($tidy->Root()->child[0]->isJste());
+
+$tidy=tidy_parse_string('text');
+var_dump($tidy->Root()->child[0]->child[1]->child[0]->isText());
+
+$tidy=tidy_parse_string('');
+$n = $tidy->Root()->child[0]->child[1]->child[0];
+var_dump($n->isComment());
+var_dump((string)$n);
+var_dump((bool)$n);
+var_dump((double)$n);
+var_dump((int)$n);
+var_dump($tidy->Root()->child[0]->child[0]->hasSiblings());
+
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+string(0) ""
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+string(16) ""
+bool(true)
+float(0)
+int(0)
+bool(true)
diff --git a/ext/tidy/tests/026.phpt b/ext/tidy/tests/026.phpt
new file mode 100644
index 0000000000..24a1e6f4a7
--- /dev/null
+++ b/ext/tidy/tests/026.phpt
@@ -0,0 +1,24 @@
+--TEST--
+tidy.clean_output test
+--SKIPIF--
+
+--INI--
+tidy.clean_output=1
+--FILE--
+
+xpto
';
+
+?>
+
+--EXPECT--
+
+
+
+
+
+
+xpto
+
+