xref: /PHP-7.2/ext/xmlreader/tests/001.phpt (revision 17ccbeec)
1--TEST--
2XMLReader: libxml2 XML Reader, string data
3--SKIPIF--
4<?php if (!extension_loaded("xmlreader")) print "skip"; ?>
5--FILE--
6<?php
7/* $Id$ */
8
9$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
10<books></books>';
11
12$reader = new XMLReader();
13$reader->XML($xmlstring);
14
15// Only go through
16while ($reader->read()) {
17	echo $reader->name."\n";
18}
19$xmlstring = '';
20$reader = new XMLReader();
21$reader->XML($xmlstring);
22?>
23===DONE===
24--EXPECTF--
25books
26books
27
28Warning: XMLReader::XML(): Empty string supplied as input in %s on line %d
29===DONE===
30