blob: 41a833b5aa83431f607b2600a84e946057a03392 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)
|