1--TEST--
2Test DOMDocument::loadXML() with LIBXML_DTDATTR, LIBXML_NOCDATA, LIBXML_NOENT, LIBXML_NOBLANKS
3--DESCRIPTION--
4This test verifies the right behaviour of the following constants:
5LIBXML_DTDATTR, LIBXML_NOCDATA, LIBXML_NOENT and LIBXML_NOBLANKS
6Environment variables used in the test:
7- XML_FILE: the xml file to load
8- LOAD_OPTIONS: the second parameter to pass to the method
9- EXPECTED_RESULT: the expected result
10--CREDITS--
11Antonio Diaz Ruiz <dejalatele@gmail.com>
12--EXTENSIONS--
13dom
14--ENV--
15XML_FILE=/book_with_dtd2.xml
16LOAD_OPTIONS=LIBXML_DTDATTR|LIBXML_NOCDATA|LIBXML_NOENT|LIBXML_NOBLANKS
17EXPECTED_RESULT=1
18--FILE_EXTERNAL--
19domdocumentloadxml_test_method_savexml.inc
20--EXPECT--
21<?xml version="1.0" encoding="UTF-8"?>
22<!DOCTYPE books [
23<!ENTITY entitest "entity is only for test purposes">
24<!ATTLIST title default CDATA "default title">
25<!ELEMENT books (book)*>
26<!ELEMENT book (title , author)>
27<!ELEMENT title (#PCDATA)>
28<!ELEMENT author (#PCDATA)>
29]>
30<books><book><title default="default title">The Grapes of Wrath</title><author>John Steinbeck</author></book><book><title default="default title">The Pearl</title><author>John Steinbeck</author></book><book><title default="default title">entity is only for test purposes</title><author>data for test</author></book></books>
31