summaryrefslogtreecommitdiff
path: root/ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt')
-rw-r--r--ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt
new file mode 100644
index 000000000..e59ff56c5
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test DOMDocument::loadHTMLFile when an empty string is passed
+--DESCRIPTION--
+Verifies that an error message is showed if an empty string is passed as argument
+--CREDITS--
+Antonio Diaz Ruiz <dejalatele@gmail.com>
+--INI--
+assert.bail=true
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+$doc = new DOMDocument();
+$result = $doc->loadHTMLFile("");
+assert('$result === false');
+?>
+--EXPECTF--
+%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): Empty string supplied as input %s