]> granicus.if.org Git - php/commitdiff
- Use var_dump() and fix test expectations
authorMarcus Boerger <helly@php.net>
Sat, 29 Oct 2005 21:01:03 +0000 (21:01 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 29 Oct 2005 21:01:03 +0000 (21:01 +0000)
ext/spl/tests/sxe_001.phpt

index 72180d6a1e4debb14b6c8eaae996b97c2deecc69..c6e6b41d0c3b78c8b60487f037e177dea3b3f5f1 100755 (executable)
@@ -26,38 +26,39 @@ $xml =<<<EOF
 </sxe>
 EOF;
 
-$sxe = simplexml_load_string($xml, 'SimpleXMLIterator');
-
-print_r($sxe);
+var_dump(simplexml_load_string($xml, 'SimpleXMLIterator'));
 
 ?>
 ===DONE===
---EXPECT--
-SimpleXMLIterator Object
-(
-    [elem1] => SimpleXMLIterator Object
-        (
-            [comment] => SimpleXMLIterator Object
-                (
-                )
-
-            [elem2] => SimpleXMLIterator Object
-                (
-                    [elem3] => SimpleXMLIterator Object
-                        (
-                            [elem4] => SimpleXMLIterator Object
-                                (
-                                    [test] => SimpleXMLIterator Object
-                                        (
-                                        )
-
-                                )
-
-                        )
-
-                )
-
-        )
-
-)
+--EXPECTF--
+object(SimpleXMLIterator)#%d (2) {
+  ["@attributes"]=>
+  array(1) {
+    ["id"]=>
+    string(5) "elem1"
+  }
+  ["elem1"]=>
+  object(SimpleXMLIterator)#%d (3) {
+    ["@attributes"]=>
+    array(1) {
+      ["attr1"]=>
+      string(5) "first"
+    }
+    ["comment"]=>
+    object(SimpleXMLIterator)#%d (0) {
+    }
+    ["elem2"]=>
+    object(SimpleXMLIterator)#%d (1) {
+      ["elem3"]=>
+      object(SimpleXMLIterator)#%d (1) {
+        ["elem4"]=>
+        object(SimpleXMLIterator)#%d (1) {
+          ["test"]=>
+          object(SimpleXMLIterator)#%d (0) {
+          }
+        }
+      }
+    }
+  }
+}
 ===DONE===