Annotation of embedaddon/php/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: DomDocument::schemaValidate() - file that is not a schema
3: --CREDITS--
4: Daniel Convissor <danielc@php.net>
5: # TestFest 2009 NYPHP
6: --SKIPIF--
7: <?php require_once('skipif.inc'); ?>
8: --FILE--
9: <?php
10:
11: $doc = new DOMDocument;
12:
13: $doc->load(dirname(__FILE__)."/book.xml");
14:
15: $result = $doc->schemaValidate(dirname(__FILE__)."/book-not-a-schema.xsd");
16: var_dump($result);
17:
18: ?>
19: --EXPECTF--
20: Warning: DOMDocument::schemaValidate(): %sbook-not-a-schema.xsd:1: parser error : Start tag expected, '<' not found in %s.php on line %d
21:
22: Warning: DOMDocument::schemaValidate(): Let's see what happens upon parsing a file that doesn't contain a schema. in %s.php on line %d
23:
24: Warning: DOMDocument::schemaValidate(): ^ in %s.php on line %d
25:
26: Warning: DOMDocument::schemaValidate(): Failed to parse the XML resource '%sbook-not-a-schema.xsd'. in %s.php on line %d
27:
28: Warning: DOMDocument::schemaValidate(): Invalid Schema in %s.php on line %d
29: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>