summaryrefslogtreecommitdiff
path: root/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt')
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
new file mode 100644
index 0000000..41a833b
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
@@ -0,0 +1,23 @@
+--TEST--
+DomDocument::schemaValidateSource() - non-conforming schema
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$xsd = file_get_contents(dirname(__FILE__)."/book-non-conforming-schema.xsd");
+
+$result = $doc->schemaValidateSource($xsd);
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidateSource(): Element 'books': No matching global declaration available for the validation root. in %s.php on line %d
+bool(false)