1--TEST--
2DOMDocument::validate() should validate an internal DTD declaration
3--CREDITS--
4Knut Urdalen <knut@php.net>
5#PHPTestFest2009 Norway 2009-06-09 \o/
6--EXTENSIONS--
7dom
8--FILE--
9<?php
10$xml = "<?xml version=\"1.0\"?>
11<!DOCTYPE note [
12<!ELEMENT note (to,from,heading,body)>
13<!ELEMENT to (#PCDATA)>
14<!ELEMENT from (#PCDATA)>
15<!ELEMENT heading (#PCDATA)>
16<!ELEMENT body (#PCDATA)>
17]>
18<note>
19<to>Tove</to>
20<from>Jani</from>
21<heading>Reminder</heading>
22<body>Don't forget me this weekend</body>
23</note>";
24$dom = new DOMDocument('1.0');
25$dom->loadXML($xml);
26var_dump($dom->validate());
27?>
28--EXPECT--
29bool(true)
30