Annotation of embedaddon/php/ext/xmlreader/tests/001.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: XMLReader: libxml2 XML Reader, string data
3: --SKIPIF--
4: <?php if (!extension_loaded("xmlreader")) print "skip"; ?>
5: --FILE--
6: <?php
1.1.1.2 ! misho 7: /* $Id$ */
1.1 misho 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
16: while ($reader->read()) {
17: echo $reader->name."\n";
18: }
19: $xmlstring = '';
20: $reader = new XMLReader();
21: $reader->XML($xmlstring);
22: ?>
23: ===DONE===
24: --EXPECTF--
25: books
26: books
27:
28: Warning: XMLReader::XML(): Empty string supplied as input in %s on line %d
29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>