diff options
Diffstat (limited to 'ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt')
-rw-r--r-- | ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt new file mode 100644 index 0000000000..d253ad9690 --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt @@ -0,0 +1,23 @@ +--TEST-- +DomDocument::schemaValidate() - Don't add missing attribute default values from schema +--CREDITS-- +Chris Wright <info@daverandom.com> +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +$doc = new DOMDocument; + +$doc->load(dirname(__FILE__)."/book-attr.xml"); + +$doc->schemaValidate(dirname(__FILE__)."/book.xsd"); + +foreach ($doc->getElementsByTagName('book') as $book) { + var_dump($book->getAttribute('is-hardback')); +} + +?> +--EXPECT-- +string(0) "" +string(4) "true" |