summaryrefslogtreecommitdiff
path: root/ext/tidy/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tidy/tests')
-rw-r--r--ext/tidy/tests/uninitialized.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/tidy/tests/uninitialized.phpt b/ext/tidy/tests/uninitialized.phpt
new file mode 100644
index 0000000000..3533f0d345
--- /dev/null
+++ b/ext/tidy/tests/uninitialized.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Operations on uninitialized tidy object
+--SKIPIF--
+<?php if (!extension_loaded("tidy")) print "skip"; ?>
+--FILE--
+<?php
+
+$tidy = new tidy;
+try {
+ var_dump($tidy->getHtmlVer());
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump($tidy->isXhtml());
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump($tidy->isXml());
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECT--
+tidy object is not initialized
+tidy object is not initialized
+tidy object is not initialized