summaryrefslogtreecommitdiff
path: root/ext/xmlreader/tests/011.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/xmlreader/tests/011.phpt')
-rw-r--r--ext/xmlreader/tests/011.phpt34
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/xmlreader/tests/011.phpt b/ext/xmlreader/tests/011.phpt
new file mode 100644
index 0000000..8959923
--- /dev/null
+++ b/ext/xmlreader/tests/011.phpt
@@ -0,0 +1,34 @@
+--TEST--
+XMLReader: libxml2 XML Reader, string data
+--SKIPIF--
+<?php if (!extension_loaded("xmlreader")) print "skip";
+$reader = new XMLReader();
+if (!method_exists($reader, 'readInnerXml')) print "skip";
+?>
+--FILE--
+<?php
+/* $Id$ */
+
+$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
+<books><book>test</book></books>';
+
+$reader = new XMLReader();
+$reader->XML($xmlstring);
+$reader->read();
+echo $reader->readInnerXml();
+echo "\n";
+$reader->close();
+
+
+$reader = new XMLReader();
+$reader->XML($xmlstring);
+$reader->read();
+echo $reader->readOuterXml();
+echo "\n";
+$reader->close();
+?>
+===DONE===
+--EXPECT--
+<book>test</book>
+<books><book>test</book></books>
+===DONE===