1--TEST--
2Test DOMDocument::loadXML() detects not-well formed XML
3--SKIPIF--
4<?php
5if (LIBXML_VERSION < 21100) die('skip libxml2 test variant for version >= 2.11');
6?>
7--DESCRIPTION--
8This test verifies the method detects attributes values not closed between " or '
9Environment variables used in the test:
10- XML_FILE: the xml file to load
11- LOAD_OPTIONS: the second parameter to pass to the method
12- EXPECTED_RESULT: the expected result
13--CREDITS--
14Antonio Diaz Ruiz <dejalatele@gmail.com>
15--INI--
16assert.bail=true
17--EXTENSIONS--
18dom
19--ENV--
20XML_FILE=/not_well_formed2.xml
21LOAD_OPTIONS=0
22EXPECTED_RESULT=0
23--FILE_EXTERNAL--
24domdocumentloadxml_test_method.inc
25--EXPECTF--
26Warning: DOMDocument::loadXML(): AttValue: " or ' expected in Entity, line: 4 in %s on line %d
27
28Warning: DOMDocument::loadXML(): internal error: xmlParseStartTag: problem parsing attributes in Entity, line: 4 in %s on line %d
29
30Warning: DOMDocument::loadXML(): Couldn't find end of Start Tag book line 4 in Entity, line: 4 in %s on line %d
31
32Warning: DOMDocument::loadXML(): Opening and ending tag mismatch: books line 3 and book in Entity, line: 7 in %s on line %d
33
34Warning: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 8 in %s on line %d
35