xref: /PHP-5.3/ext/xmlreader/tests/bug42139.phpt (revision adb1cd83)
1--TEST--
2Bug #42139 (XMLReader option constants are broken using XML())
3--SKIPIF--
4<?php if (!extension_loaded("xmlreader")) print "skip";
5if (LIBXML_VERSION < 20628) die("skip: libxml2 2.6.28+ required");
6?>
7--FILE--
8<?php
9
10$xml = <<<XML
11<?xml version="1.0" encoding="utf-8"?>
12<!DOCTYPE root [
13<!ELEMENT root ANY>
14<!ENTITY x "y">
15]>
16<root>&x;</root>
17XML;
18
19$reader = new XMLReader;
20$reader->XML( $xml, NULL, LIBXML_NOENT);
21while ( $reader->read() ) {
22  echo "{$reader->nodeType}, {$reader->name}, {$reader->value}\n";
23}
24$reader->close();
25
26?>
27--EXPECT--
2810, root,
291, root,
303, #text, y
3115, root,
32