1--TEST--
2Test DOMDocument::load() detects not-well formed XML
3--SKIPIF--
4<?php
5if (LIBXML_VERSION >= 21200) die('skip libxml2 test variant for version < 2.12');
6?>
7--DESCRIPTION--
8This test verifies the method detects an opening and ending tag mismatch
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_formed.xml
21LOAD_OPTIONS=0
22EXPECTED_RESULT=0
23--FILE_EXTERNAL--
24domdocumentload_test_method.inc
25--EXPECTF--
26Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: title line 5 and book %s
27
28Warning: DOMDocument::load%r(XML){0,1}%r(): %rexpected '>'|Opening and ending tag mismatch: book line (4|5) and books%r %s
29
30Warning: DOMDocument::load%r(XML){0,1}%r(): %rPremature end of data in tag books|EndTag: '<\/' not found%r %s
31