]> granicus.if.org Git - php/commitdiff
fix spl tests
authorAntony Dovgal <tony2001@php.net>
Tue, 19 Sep 2006 12:01:18 +0000 (12:01 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 19 Sep 2006 12:01:18 +0000 (12:01 +0000)
12 files changed:
ext/spl/tests/iterator_006.phpt
ext/spl/tests/iterator_050.phpt
ext/spl/tests/iterator_051.phpt
ext/spl/tests/iterator_052.phpt
ext/spl/tests/iterator_053.phpt
ext/spl/tests/iterator_054.phpt
ext/spl/tests/iterator_055.phpt
ext/spl/tests/sxe_001.phpt
ext/spl/tests/sxe_002.phpt
ext/spl/tests/sxe_003.phpt
ext/spl/tests/sxe_004.phpt
ext/spl/tests/sxe_005.phpt

index 05a1cc5a944bbe6de9d4339a2667984ab6d14681..aa8fd0e44d718b3a6998ed28fa59b2c407354e17 100755 (executable)
@@ -5,7 +5,7 @@ SPL: IteratorIterator and SimpleXMlElement
 --FILE--
 <?php
 
-$root = simplexml_load_string('<?xml version="1.0"?>
+$root = simplexml_load_string(b'<?xml version="1.0"?>
 <root>
  <child>Hello</child>
  <child>World</child>
index 6bd84a3a875012fc3badf5a5d0402312e000c552..7ecc534b4d42515750e4d3a31ac789a56c33a79f 100755 (executable)
@@ -33,41 +33,41 @@ var_dump($ar);
 int(1)
 array(3) {
   [0]=>
-  string(3) "1,2"
+  %s(3) "1,2"
   [1]=>
-  string(1) "1"
+  %s(1) "1"
   [2]=>
-  string(1) "2"
+  %s(1) "2"
 }
 int(2)
 array(3) {
   [0]=>
-  string(3) "1,2"
+  %s(3) "1,2"
   [1]=>
-  string(1) "1"
+  %s(1) "1"
   [2]=>
-  string(1) "2"
+  %s(1) "2"
 }
 int(0)
 array(2) {
   [0]=>
-  string(1) "1"
+  %s(1) "1"
   [1]=>
-  string(1) "1"
+  %s(1) "1"
 }
 int(1)
 array(2) {
   [0]=>
-  string(1) "1"
+  %s(1) "1"
   [1]=>
-  string(1) "1"
+  %s(1) "1"
 }
 int(2)
 array(2) {
   [0]=>
-  string(1) "1"
+  %s(1) "1"
   [1]=>
-  string(1) "1"
+  %s(1) "1"
 }
 object(ArrayIterator)#%d (9) {
   [0]=>
index 9b319acefdecdfdb9234bab19a8466588c8bfc9f..67b566c4ff891e01f6590847705f63755fb84fb0 100755 (executable)
@@ -97,50 +97,50 @@ object(ArrayIterator)#%d (7) {
 unicode(3) "1,2"
 array(3) {
   [0]=>
-  string(3) "1,2"
+  unicode(3) "1,2"
   [1]=>
-  string(1) "1"
+  unicode(1) "1"
   [2]=>
-  string(1) "2"
+  unicode(1) "2"
 }
 unicode(5) "1,2,3"
 array(3) {
   [0]=>
-  string(3) "1,2"
+  unicode(3) "1,2"
   [1]=>
-  string(1) "1"
+  unicode(1) "1"
   [2]=>
-  string(1) "2"
+  unicode(1) "2"
 }
 int(1)
 array(2) {
   [0]=>
-  string(1) "1"
+  unicode(1) "1"
   [1]=>
-  string(1) "1"
+  unicode(1) "1"
 }
 unicode(3) "1,2"
 array(2) {
   [0]=>
-  string(1) "1"
+  unicode(1) "1"
   [1]=>
-  string(1) "1"
+  unicode(1) "1"
 }
 unicode(5) "1,2,3"
 array(2) {
   [0]=>
-  string(1) "1"
+  unicode(1) "1"
   [1]=>
-  string(1) "1"
+  unicode(1) "1"
 }
 int(0)
 array(2) {
   [0]=>
-  string(1) "0"
+  unicode(1) "0"
   [1]=>
-  string(1) "0"
+  unicode(1) "0"
 }
-object(ArrayIterator)#%d (7) {
+object(ArrayIterator)#1 (7) {
   [1]=>
   int(0)
   [u"1,2"]=>
index 9bd7d899ec6877965dfc0c02391f8066a123c67e..1e1ef201aa85cf55b79bc716b3992eb11cce43db 100755 (executable)
@@ -312,3 +312,269 @@ object(ArrayIterator)#%d (9) {
   %s(2) ",,"
 }
 ===DONE===
+--UEXPECTF--
+bool(true)
+int(0)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(1)
+array(3) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(3) "1,2"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "1"
+  }
+  [2]=>
+  array(1) {
+    [0]=>
+    unicode(1) "2"
+  }
+}
+bool(true)
+int(2)
+array(3) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(3) "1,2"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "1"
+  }
+  [2]=>
+  array(1) {
+    [0]=>
+    unicode(1) "2"
+  }
+}
+bool(true)
+int(3)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(4)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(5)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(6)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(7)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(8)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(0)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "1"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "1"
+  }
+}
+bool(true)
+int(1)
+array(2) {
+  [0]=>
+  array(2) {
+    [0]=>
+    unicode(1) "1"
+    [1]=>
+    unicode(1) "2"
+  }
+  [1]=>
+  array(2) {
+    [0]=>
+    unicode(1) "1"
+    [1]=>
+    unicode(1) "2"
+  }
+}
+bool(true)
+int(2)
+array(2) {
+  [0]=>
+  array(3) {
+    [0]=>
+    unicode(1) "1"
+    [1]=>
+    unicode(1) "2"
+    [2]=>
+    unicode(1) "3"
+  }
+  [1]=>
+  array(3) {
+    [0]=>
+    unicode(1) "1"
+    [1]=>
+    unicode(1) "2"
+    [2]=>
+    unicode(1) "3"
+  }
+}
+bool(true)
+int(3)
+array(2) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+}
+bool(true)
+int(4)
+array(2) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+}
+bool(true)
+int(5)
+array(2) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+}
+bool(true)
+int(6)
+array(2) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+}
+bool(true)
+int(7)
+array(2) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+}
+bool(true)
+int(8)
+array(2) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+}
+object(ArrayIterator)#%d (9) {
+  [0]=>
+  unicode(1) "1"
+  [1]=>
+  unicode(3) "1,2"
+  [2]=>
+  unicode(5) "1,2,3"
+  [3]=>
+  unicode(0) ""
+  [4]=>
+  NULL
+  [5]=>
+  array(0) {
+  }
+  [6]=>
+  unicode(6) "FooBar"
+  [7]=>
+  unicode(1) ","
+  [8]=>
+  unicode(2) ",,"
+}
+===DONE===
index 4d68b0113f0bce20f52956bca1971d5751cd9abf..c64c2aada6db22503e09391d6e9444a0732cd0ff 100755 (executable)
@@ -312,3 +312,269 @@ object(ArrayIterator)#%d (9) {
   %s(2) ",,"
 }
 ===DONE===
+--UEXPECTF--
+bool(true)
+int(0)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(1)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(2)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(3)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(4)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(5)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(6)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(7)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(8)
+array(3) {
+  [0]=>
+  array(0) {
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(0) {
+  }
+}
+bool(true)
+int(0)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "0"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "0"
+  }
+}
+bool(true)
+int(1)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "1"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "1"
+  }
+}
+bool(true)
+int(2)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "2"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "2"
+  }
+}
+bool(true)
+int(3)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "3"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "3"
+  }
+}
+bool(true)
+int(4)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "4"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "4"
+  }
+}
+bool(true)
+int(5)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "5"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "5"
+  }
+}
+bool(true)
+int(6)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "6"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "6"
+  }
+}
+bool(true)
+int(7)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "7"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "7"
+  }
+}
+bool(true)
+int(8)
+array(2) {
+  [0]=>
+  array(1) {
+    [0]=>
+    unicode(1) "8"
+  }
+  [1]=>
+  array(1) {
+    [0]=>
+    unicode(1) "8"
+  }
+}
+object(ArrayIterator)#%d (9) {
+  [0]=>
+  unicode(1) "1"
+  [1]=>
+  unicode(3) "1,2"
+  [2]=>
+  unicode(5) "1,2,3"
+  [3]=>
+  unicode(0) ""
+  [4]=>
+  NULL
+  [5]=>
+  array(0) {
+  }
+  [6]=>
+  unicode(6) "FooBar"
+  [7]=>
+  unicode(1) ","
+  [8]=>
+  unicode(2) ",,"
+}
+===DONE===
index 3f724697a9218136aad21ab8649c65bc643265d0..759c61bc8c0744759f9cbd0d60555b44a8f85475 100755 (executable)
@@ -82,3 +82,58 @@ object(ArrayIterator)#%d (9) {
   %s(2) ",,"
 }
 ===DONE===
+--UEXPECTF--
+int(1)
+array(2) {
+  [0]=>
+  unicode(1) "1"
+  [1]=>
+  unicode(1) "2"
+}
+int(2)
+array(3) {
+  [0]=>
+  unicode(1) "1"
+  [1]=>
+  unicode(1) "2"
+  [2]=>
+  unicode(1) "3"
+}
+int(7)
+array(2) {
+  [0]=>
+  unicode(0) ""
+  [1]=>
+  unicode(0) ""
+}
+int(8)
+array(3) {
+  [0]=>
+  unicode(0) ""
+  [1]=>
+  unicode(0) ""
+  [2]=>
+  unicode(0) ""
+}
+object(ArrayIterator)#%d (9) {
+  [0]=>
+  unicode(1) "1"
+  [1]=>
+  unicode(3) "1,2"
+  [2]=>
+  unicode(5) "1,2,3"
+  [3]=>
+  unicode(0) ""
+  [4]=>
+  NULL
+  [5]=>
+  array(0) {
+  }
+  [6]=>
+  unicode(6) "FooBar"
+  [7]=>
+  unicode(1) ","
+  [8]=>
+  unicode(2) ",,"
+}
+===DONE===
index d6c8b6853c252f0c589e34ef15fa5b2a8ddfe903..e7854755cc586bbd8ce688671da48d7857c953d3 100755 (executable)
@@ -63,16 +63,16 @@ object(ArrayIterator)#%d (7) {
 unicode(3) "1,2"
 array(2) {
   [0]=>
-  string(0) ""
+  unicode(0) ""
   [1]=>
-  string(0) ""
+  unicode(0) ""
 }
 unicode(5) "1,2,3"
 array(2) {
   [0]=>
-  string(0) ""
+  unicode(0) ""
   [1]=>
-  string(2) ",3"
+  unicode(2) ",3"
 }
 object(ArrayIterator)#%d (7) {
   [1]=>
index 0f5530249e6a5075c87677b613f604da17276c14..48747992d749ce2e67f8dfece0a57d47ccd6cd47 100755 (executable)
@@ -26,7 +26,7 @@ $xml =<<<EOF
 </sxe>
 EOF;
 
-var_dump(simplexml_load_string($xml, 'SimpleXMLIterator'));
+var_dump(simplexml_load_string((binary)$xml, 'SimpleXMLIterator'));
 
 ?>
 ===DONE===
index 4734625fcdf1723957fe257d1c698d2bef9c2911..e8f694a8e1a551717ac7844fa883539104e9eb7c 100755 (executable)
@@ -37,7 +37,7 @@ $xml =<<<EOF
 </sxe>
 EOF;
 
-$sxe = simplexml_load_string($xml, 'SimpleXMLIterator');
+$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator');
 
 foreach(new RecursiveIteratorIterator($sxe, 1) as $name => $data) {
        var_dump($name);
index 0d09b4ea6e3abb889bbad91b658e833733d6751b..823213ff941be653b4836e439005b3ab6184a465 100755 (executable)
@@ -37,7 +37,7 @@ $xml =<<<EOF
 </sxe>
 EOF;
 
-$sxe = simplexml_load_string($xml, 'SimpleXMLIterator');
+$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator');
 
 foreach($sxe->getChildren() as $name => $data) {
        var_dump($name);
index 487de45071003f31f05ea78b339090b564333258..34957ccd26f0e35cb35762dcdae4cc20fdc61cb3 100755 (executable)
@@ -76,7 +76,7 @@ class SXETest extends SimpleXMLIterator
        }
 }
 
-$sxe = new SXETest($xml);
+$sxe = new SXETest((binary)$xml);
 $rit = new RecursiveIteratorIterator($sxe, RecursiveIteratorIterator::SELF_FIRST);
 
 foreach($rit as $data) {
index 2efd0a6bee48f52787c4d89ba84339683f75e8fb..dbef1dd99b6f4559518758a1af1fa3b7afa7e1ff 100755 (executable)
@@ -28,7 +28,7 @@ class SXETest extends SimpleXMLIterator
        }
 }
 
-$sxe = new SXETest($xml);
+$sxe = new SXETest((binary)$xml);
 
 var_dump(count($sxe));
 var_dump(count($sxe->elem1));