From: Antony Dovgal Date: Tue, 19 Sep 2006 12:01:18 +0000 (+0000) Subject: fix spl tests X-Git-Tag: RELEASE_1_0_0RC1~1624 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=074615035f8c43e5da303ee5ba1acb1accb65578;p=php fix spl tests --- diff --git a/ext/spl/tests/iterator_006.phpt b/ext/spl/tests/iterator_006.phpt index 05a1cc5a94..aa8fd0e44d 100755 --- a/ext/spl/tests/iterator_006.phpt +++ b/ext/spl/tests/iterator_006.phpt @@ -5,7 +5,7 @@ SPL: IteratorIterator and SimpleXMlElement --FILE-- +$root = simplexml_load_string(b' Hello World diff --git a/ext/spl/tests/iterator_050.phpt b/ext/spl/tests/iterator_050.phpt index 6bd84a3a87..7ecc534b4d 100755 --- a/ext/spl/tests/iterator_050.phpt +++ b/ext/spl/tests/iterator_050.phpt @@ -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]=> diff --git a/ext/spl/tests/iterator_051.phpt b/ext/spl/tests/iterator_051.phpt index 9b319acefd..67b566c4ff 100755 --- a/ext/spl/tests/iterator_051.phpt +++ b/ext/spl/tests/iterator_051.phpt @@ -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"]=> diff --git a/ext/spl/tests/iterator_052.phpt b/ext/spl/tests/iterator_052.phpt index 9bd7d899ec..1e1ef201aa 100755 --- a/ext/spl/tests/iterator_052.phpt +++ b/ext/spl/tests/iterator_052.phpt @@ -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=== diff --git a/ext/spl/tests/iterator_053.phpt b/ext/spl/tests/iterator_053.phpt index 4d68b0113f..c64c2aada6 100755 --- a/ext/spl/tests/iterator_053.phpt +++ b/ext/spl/tests/iterator_053.phpt @@ -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=== diff --git a/ext/spl/tests/iterator_054.phpt b/ext/spl/tests/iterator_054.phpt index 3f724697a9..759c61bc8c 100755 --- a/ext/spl/tests/iterator_054.phpt +++ b/ext/spl/tests/iterator_054.phpt @@ -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=== diff --git a/ext/spl/tests/iterator_055.phpt b/ext/spl/tests/iterator_055.phpt index d6c8b6853c..e7854755cc 100755 --- a/ext/spl/tests/iterator_055.phpt +++ b/ext/spl/tests/iterator_055.phpt @@ -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]=> diff --git a/ext/spl/tests/sxe_001.phpt b/ext/spl/tests/sxe_001.phpt index 0f5530249e..48747992d7 100755 --- a/ext/spl/tests/sxe_001.phpt +++ b/ext/spl/tests/sxe_001.phpt @@ -26,7 +26,7 @@ $xml =<< EOF; -var_dump(simplexml_load_string($xml, 'SimpleXMLIterator')); +var_dump(simplexml_load_string((binary)$xml, 'SimpleXMLIterator')); ?> ===DONE=== diff --git a/ext/spl/tests/sxe_002.phpt b/ext/spl/tests/sxe_002.phpt index 4734625fcd..e8f694a8e1 100755 --- a/ext/spl/tests/sxe_002.phpt +++ b/ext/spl/tests/sxe_002.phpt @@ -37,7 +37,7 @@ $xml =<< 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); diff --git a/ext/spl/tests/sxe_003.phpt b/ext/spl/tests/sxe_003.phpt index 0d09b4ea6e..823213ff94 100755 --- a/ext/spl/tests/sxe_003.phpt +++ b/ext/spl/tests/sxe_003.phpt @@ -37,7 +37,7 @@ $xml =<< EOF; -$sxe = simplexml_load_string($xml, 'SimpleXMLIterator'); +$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator'); foreach($sxe->getChildren() as $name => $data) { var_dump($name); diff --git a/ext/spl/tests/sxe_004.phpt b/ext/spl/tests/sxe_004.phpt index 487de45071..34957ccd26 100755 --- a/ext/spl/tests/sxe_004.phpt +++ b/ext/spl/tests/sxe_004.phpt @@ -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) { diff --git a/ext/spl/tests/sxe_005.phpt b/ext/spl/tests/sxe_005.phpt index 2efd0a6bee..dbef1dd99b 100755 --- a/ext/spl/tests/sxe_005.phpt +++ b/ext/spl/tests/sxe_005.phpt @@ -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));