summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/001.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/simplexml/tests/001.phpt')
-rw-r--r--ext/simplexml/tests/001.phpt43
1 files changed, 43 insertions, 0 deletions
diff --git a/ext/simplexml/tests/001.phpt b/ext/simplexml/tests/001.phpt
new file mode 100644
index 0000000..0be7771
--- /dev/null
+++ b/ext/simplexml/tests/001.phpt
@@ -0,0 +1,43 @@
+--TEST--
+SimpleXML: Simple document
+--SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
+--FILE--
+<?php
+
+var_dump(simplexml_load_file(dirname(__FILE__).'/sxe.xml'));
+
+?>
+===DONE===
+--EXPECTF--
+object(SimpleXMLElement)#%d (2) {
+ ["@attributes"]=>
+ array(1) {
+ ["id"]=>
+ string(5) "elem1"
+ }
+ ["elem1"]=>
+ object(SimpleXMLElement)#%d (3) {
+ ["@attributes"]=>
+ array(1) {
+ ["attr1"]=>
+ string(5) "first"
+ }
+ ["comment"]=>
+ object(SimpleXMLElement)#%d (0) {
+ }
+ ["elem2"]=>
+ object(SimpleXMLElement)#%d (1) {
+ ["elem3"]=>
+ object(SimpleXMLElement)#%d (1) {
+ ["elem4"]=>
+ object(SimpleXMLElement)#%d (1) {
+ ["test"]=>
+ object(SimpleXMLElement)#%d (0) {
+ }
+ }
+ }
+ }
+ }
+}
+===DONE===