summaryrefslogtreecommitdiff
path: root/ext/xmlreader/tests/001.phpt
blob: fa87eba8b41901dd9e00f0af1024e2ba6011271a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
XMLReader: libxml2 XML Reader, string data
--SKIPIF--
<?php if (!extension_loaded("xmlreader")) print "skip"; ?>
--FILE--
<?php

$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
<books></books>';

$reader = new XMLReader();
$reader->XML($xmlstring);

// Only go through
while ($reader->read()) {
	echo $reader->name."\n";
}
$xmlstring = '';
$reader = new XMLReader();
$reader->XML($xmlstring);
?>
===DONE===
--EXPECTF--
books
books

Warning: XMLReader::XML(): Empty string supplied as input in %s on line %d
===DONE===