summaryrefslogtreecommitdiff
path: root/ext/spl/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests')
-rwxr-xr-xext/spl/tests/array_015.phpt2
-rwxr-xr-xext/spl/tests/array_016.phpt2
-rwxr-xr-xext/spl/tests/bug31185.phpt2
-rwxr-xr-xext/spl/tests/bug31346.phpt2
-rwxr-xr-xext/spl/tests/bug31348.phpt2
-rwxr-xr-xext/spl/tests/bug31926.phpt2
-rwxr-xr-xext/spl/tests/bug32134.phpt2
-rwxr-xr-xext/spl/tests/bug32394.phpt2
-rwxr-xr-xext/spl/tests/bug33136.phpt2
-rw-r--r--ext/spl/tests/bug34548.phpt2
-rwxr-xr-xext/spl/tests/fileobject_001.phpt2
-rwxr-xr-xext/spl/tests/fileobject_002.phpt2
-rwxr-xr-xext/spl/tests/iterator_010.phpt2
-rwxr-xr-xext/spl/tests/iterator_011.phpt2
-rwxr-xr-xext/spl/tests/iterator_012.phpt2
-rwxr-xr-xext/spl/tests/iterator_013.phpt2
-rwxr-xr-xext/spl/tests/iterator_014.phpt2
-rwxr-xr-xext/spl/tests/iterator_015.phpt2
-rwxr-xr-xext/spl/tests/iterator_016.phpt2
-rwxr-xr-xext/spl/tests/iterator_017.phpt2
-rwxr-xr-xext/spl/tests/iterator_018.phpt2
-rwxr-xr-xext/spl/tests/iterator_019.phpt2
-rwxr-xr-xext/spl/tests/iterator_020.phpt2
-rwxr-xr-xext/spl/tests/iterator_021.phpt2
-rwxr-xr-xext/spl/tests/iterator_022.phpt2
-rwxr-xr-xext/spl/tests/iterator_023.phpt2
-rwxr-xr-xext/spl/tests/iterator_024.phpt2
-rwxr-xr-xext/spl/tests/iterator_025.phpt2
-rwxr-xr-xext/spl/tests/iterator_026.phpt2
-rwxr-xr-xext/spl/tests/iterator_028.phpt60
-rwxr-xr-xext/spl/tests/observer_001.phpt2
-rwxr-xr-xext/spl/tests/observer_002.phpt2
-rwxr-xr-xext/spl/tests/spl_001.phpt2
-rwxr-xr-xext/spl/tests/spl_002.phpt2
-rwxr-xr-xext/spl/tests/spl_autoload_001.phpt2
-rwxr-xr-xext/spl/tests/spl_autoload_002.phpt5
-rwxr-xr-xext/spl/tests/spl_autoload_003.phpt2
-rwxr-xr-xext/spl/tests/spl_autoload_004.phpt15
-rwxr-xr-xext/spl/tests/spl_autoload_005.phpt2
-rwxr-xr-xext/spl/tests/spl_autoload_006.phpt2
-rwxr-xr-xext/spl/tests/spl_autoload_007.phpt140
-rwxr-xr-xext/spl/tests/sxe_001.phpt63
-rwxr-xr-xext/spl/tests/sxe_004.phpt59
43 files changed, 253 insertions, 163 deletions
diff --git a/ext/spl/tests/array_015.phpt b/ext/spl/tests/array_015.phpt
index 6f8c88c29..769f0b200 100755
--- a/ext/spl/tests/array_015.phpt
+++ b/ext/spl/tests/array_015.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: ArrayIterator::next() with internal arrays
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/array_016.phpt b/ext/spl/tests/array_016.phpt
index d4ea0ab39..f5a285420 100755
--- a/ext/spl/tests/array_016.phpt
+++ b/ext/spl/tests/array_016.phpt
@@ -1,5 +1,5 @@
--TEST--
-SPL: ArrayItaerator/Object and IteratorIterator
+SPL: ArrayIterator/Object and IteratorIterator
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
diff --git a/ext/spl/tests/bug31185.phpt b/ext/spl/tests/bug31185.phpt
index b4f315b0b..421eb89ec 100755
--- a/ext/spl/tests/bug31185.phpt
+++ b/ext/spl/tests/bug31185.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #31185 (Crash when exceptions thrown from ArrayAccess::offsetUnset())
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/bug31346.phpt b/ext/spl/tests/bug31346.phpt
index b5839a005..b5414881a 100755
--- a/ext/spl/tests/bug31346.phpt
+++ b/ext/spl/tests/bug31346.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #31486 (ArrayIterator::next segfaults)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
$obj = new stdClass;
diff --git a/ext/spl/tests/bug31348.phpt b/ext/spl/tests/bug31348.phpt
index f74e53e71..a358ab99e 100755
--- a/ext/spl/tests/bug31348.phpt
+++ b/ext/spl/tests/bug31348.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #31348 (CachingIterator::rewind() leaks)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
$a = Array("some","blah");
diff --git a/ext/spl/tests/bug31926.phpt b/ext/spl/tests/bug31926.phpt
index 443fef617..17c0b6a9b 100755
--- a/ext/spl/tests/bug31926.phpt
+++ b/ext/spl/tests/bug31926.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #31926 (php in free() error with RecursiveArrayIterator)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/bug32134.phpt b/ext/spl/tests/bug32134.phpt
index 5a880b321..e8527cd15 100755
--- a/ext/spl/tests/bug32134.phpt
+++ b/ext/spl/tests/bug32134.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #32134 (Overloading offsetGet/offsetSet)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/bug32394.phpt b/ext/spl/tests/bug32394.phpt
index 8189b23f7..ac72e0fa1 100755
--- a/ext/spl/tests/bug32394.phpt
+++ b/ext/spl/tests/bug32394.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #32394 (offsetUnset() segfaults in a foreach)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/bug33136.phpt b/ext/spl/tests/bug33136.phpt
index 3adddfb5b..13b058307 100755
--- a/ext/spl/tests/bug33136.phpt
+++ b/ext/spl/tests/bug33136.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #33136 method offsetSet in class extended from ArrayObject crash PHP
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/bug34548.phpt b/ext/spl/tests/bug34548.phpt
index dff1375ab..90f2e8f6e 100644
--- a/ext/spl/tests/bug34548.phpt
+++ b/ext/spl/tests/bug34548.phpt
@@ -1,5 +1,7 @@
--TEST--
bug #34548 (Method append() in class extended from ArrayObject crashes PHP)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/fileobject_001.phpt b/ext/spl/tests/fileobject_001.phpt
index 61f688d79..957223b16 100755
--- a/ext/spl/tests/fileobject_001.phpt
+++ b/ext/spl/tests/fileobject_001.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: SplFileObject::seek'ing
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/fileobject_002.phpt b/ext/spl/tests/fileobject_002.phpt
index 8031e98fd..0b944f2a7 100755
--- a/ext/spl/tests/fileobject_002.phpt
+++ b/ext/spl/tests/fileobject_002.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: SplFileObject::fgetc
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_010.phpt b/ext/spl/tests/iterator_010.phpt
index 39d1000f6..e7e1a519b 100755
--- a/ext/spl/tests/iterator_010.phpt
+++ b/ext/spl/tests/iterator_010.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: EmptyIterator
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_011.phpt b/ext/spl/tests/iterator_011.phpt
index fca159a20..aed1ed5e3 100755
--- a/ext/spl/tests/iterator_011.phpt
+++ b/ext/spl/tests/iterator_011.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: InfiniteIterator
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_012.phpt b/ext/spl/tests/iterator_012.phpt
index 09842b098..8195072b5 100755
--- a/ext/spl/tests/iterator_012.phpt
+++ b/ext/spl/tests/iterator_012.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: NoRweindIterator
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_013.phpt b/ext/spl/tests/iterator_013.phpt
index 119631c00..56aea9850 100755
--- a/ext/spl/tests/iterator_013.phpt
+++ b/ext/spl/tests/iterator_013.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: AppendIterator
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_014.phpt b/ext/spl/tests/iterator_014.phpt
index 119fad05f..8f9020bf8 100755
--- a/ext/spl/tests/iterator_014.phpt
+++ b/ext/spl/tests/iterator_014.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator and beginChildren/endChildren
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_015.phpt b/ext/spl/tests/iterator_015.phpt
index aa30f79e1..57b9899e6 100755
--- a/ext/spl/tests/iterator_015.phpt
+++ b/ext/spl/tests/iterator_015.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator and beginChildren/endChildren
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_016.phpt b/ext/spl/tests/iterator_016.phpt
index f231c6eb3..4801835a1 100755
--- a/ext/spl/tests/iterator_016.phpt
+++ b/ext/spl/tests/iterator_016.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator and beginChildren/endChildren
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_017.phpt b/ext/spl/tests/iterator_017.phpt
index 39d1000f6..e7e1a519b 100755
--- a/ext/spl/tests/iterator_017.phpt
+++ b/ext/spl/tests/iterator_017.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: EmptyIterator
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_018.phpt b/ext/spl/tests/iterator_018.phpt
index 9c234bb11..3cb68eeea 100755
--- a/ext/spl/tests/iterator_018.phpt
+++ b/ext/spl/tests/iterator_018.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: InfiniteIterator
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_019.phpt b/ext/spl/tests/iterator_019.phpt
index 09842b098..8195072b5 100755
--- a/ext/spl/tests/iterator_019.phpt
+++ b/ext/spl/tests/iterator_019.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: NoRweindIterator
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_020.phpt b/ext/spl/tests/iterator_020.phpt
index 119631c00..56aea9850 100755
--- a/ext/spl/tests/iterator_020.phpt
+++ b/ext/spl/tests/iterator_020.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: AppendIterator
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_021.phpt b/ext/spl/tests/iterator_021.phpt
index 4f2395a8e..1dbd245bc 100755
--- a/ext/spl/tests/iterator_021.phpt
+++ b/ext/spl/tests/iterator_021.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator and hasChildren
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_022.phpt b/ext/spl/tests/iterator_022.phpt
index 8d055313a..1f1e6e951 100755
--- a/ext/spl/tests/iterator_022.phpt
+++ b/ext/spl/tests/iterator_022.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator and callHasChildren/callGetChildren
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_023.phpt b/ext/spl/tests/iterator_023.phpt
index 1b6b4685e..00b831e11 100755
--- a/ext/spl/tests/iterator_023.phpt
+++ b/ext/spl/tests/iterator_023.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator and catch getChildren
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_024.phpt b/ext/spl/tests/iterator_024.phpt
index 0c7dea15b..8a6fe210c 100755
--- a/ext/spl/tests/iterator_024.phpt
+++ b/ext/spl/tests/iterator_024.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator with custom iterator class
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_025.phpt b/ext/spl/tests/iterator_025.phpt
index e582b1f39..737b8f666 100755
--- a/ext/spl/tests/iterator_025.phpt
+++ b/ext/spl/tests/iterator_025.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator and begin/endIteration()
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_026.phpt b/ext/spl/tests/iterator_026.phpt
index 8df96f0d2..4c6fcf73b 100755
--- a/ext/spl/tests/iterator_026.phpt
+++ b/ext/spl/tests/iterator_026.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: CachingIterator::hasNext()
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/iterator_028.phpt b/ext/spl/tests/iterator_028.phpt
index 7ec76d814..8fef74d77 100755
--- a/ext/spl/tests/iterator_028.phpt
+++ b/ext/spl/tests/iterator_028.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: RecursiveIteratorIterator and setMaxDepth()
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
@@ -110,61 +112,3 @@ bool(false)
string(33) "Parameter max_depth must be >= -1"
int(4)
===DONE===
---UEXPECT--
-===?===
-bool(false)
-0: 1
-0: 2
-1: 31
-1: 32
-2: 331
-3: 3321
-4: 33221
-0: 4
-===2===
-int(2)
-0: 1
-0: 2
-1: 31
-1: 32
-2: 331
-0: 4
-===X===
-bool(false)
-0: 1
-0: 2
-1: 31
-1: 32
-2: 331
-3: 3321
-4: 33221
-0: 4
-===3===
-int(3)
-0: 1
-0: 2
-1: 31
-1: 32
-2: 331
-3: 3321
-0: 4
-===5===
-int(5)
-0: 1
-0: 2
-1: 31
-1: 32
-2: 331
-3: 3321
-4: 33221
-0: 4
-===0===
-int(0)
-0: 1
-0: 2
-0: 4
-===-1===
-bool(false)
-unicode(33) "Parameter max_depth must be >= -1"
-int(4)
-===DONE===
diff --git a/ext/spl/tests/observer_001.phpt b/ext/spl/tests/observer_001.phpt
index e7d72b9e2..d161a4776 100755
--- a/ext/spl/tests/observer_001.phpt
+++ b/ext/spl/tests/observer_001.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: SplObserver and SplSubject (empty notify)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/observer_002.phpt b/ext/spl/tests/observer_002.phpt
index 5d006177f..7bcd9dc2e 100755
--- a/ext/spl/tests/observer_002.phpt
+++ b/ext/spl/tests/observer_002.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: SplObjectStorage
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/spl_001.phpt b/ext/spl/tests/spl_001.phpt
index e101272a8..8d637a1a6 100755
--- a/ext/spl/tests/spl_001.phpt
+++ b/ext/spl/tests/spl_001.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: iterator_to_array() and iterator_count()
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/spl_002.phpt b/ext/spl/tests/spl_002.phpt
index d8b71b20c..fbc33f0a9 100755
--- a/ext/spl/tests/spl_002.phpt
+++ b/ext/spl/tests/spl_002.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: Countable
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/spl/tests/spl_autoload_001.phpt b/ext/spl/tests/spl_autoload_001.phpt
index 11c10e957..cdee65667 100755
--- a/ext/spl/tests/spl_autoload_001.phpt
+++ b/ext/spl/tests/spl_autoload_001.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: spl_autoload() and friends
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
include_path=.
--FILE--
diff --git a/ext/spl/tests/spl_autoload_002.phpt b/ext/spl/tests/spl_autoload_002.phpt
index 21caa43bf..e7fda9c44 100755
--- a/ext/spl/tests/spl_autoload_002.phpt
+++ b/ext/spl/tests/spl_autoload_002.phpt
@@ -1,7 +1,10 @@
--TEST--
SPL: spl_autoloadfunctions()
--SKIPIF--
-<?php if (spl_autoload_functions() !== false) die('skip __autoload() registered by php.ini'); ?>
+<?php
+ if (!extension_loaded("spl")) die ("skip");
+ if (spl_autoload_functions() !== false) die('skip __autoload() registered by php.ini');
+?>
--FILE--
<?php
diff --git a/ext/spl/tests/spl_autoload_003.phpt b/ext/spl/tests/spl_autoload_003.phpt
index cc77756ee..40084d14a 100755
--- a/ext/spl/tests/spl_autoload_003.phpt
+++ b/ext/spl/tests/spl_autoload_003.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: spl_autoload() and friends
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
include_path=.
--FILE--
diff --git a/ext/spl/tests/spl_autoload_004.phpt b/ext/spl/tests/spl_autoload_004.phpt
index 627d39d13..9a91dd7f6 100755
--- a/ext/spl/tests/spl_autoload_004.phpt
+++ b/ext/spl/tests/spl_autoload_004.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: spl_autoload() with static methods
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
include_path=.
--FILE--
@@ -41,16 +43,3 @@ array(1) {
MyAutoLoader::autoLoad(TestClass)
bool(false)
===DONE===
---UEXPECTF--
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- unicode(12) "MyAutoLoader"
- [1]=>
- unicode(8) "autoLoad"
- }
-}
-MyAutoLoader::autoLoad(TestClass)
-bool(false)
-===DONE===
diff --git a/ext/spl/tests/spl_autoload_005.phpt b/ext/spl/tests/spl_autoload_005.phpt
index 51af204c5..27991547b 100755
--- a/ext/spl/tests/spl_autoload_005.phpt
+++ b/ext/spl/tests/spl_autoload_005.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: spl_autoload() with methods
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
include_path=.
--FILE--
diff --git a/ext/spl/tests/spl_autoload_006.phpt b/ext/spl/tests/spl_autoload_006.phpt
index 36cf5ca19..f704c4c75 100755
--- a/ext/spl/tests/spl_autoload_006.phpt
+++ b/ext/spl/tests/spl_autoload_006.phpt
@@ -1,5 +1,7 @@
--TEST--
SPL: spl_autoload() with static methods
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
include_path=.
--FILE--
diff --git a/ext/spl/tests/spl_autoload_007.phpt b/ext/spl/tests/spl_autoload_007.phpt
new file mode 100755
index 000000000..ad5df1a41
--- /dev/null
+++ b/ext/spl/tests/spl_autoload_007.phpt
@@ -0,0 +1,140 @@
+--TEST--
+SPL: spl_autoload() with inaccessible methods
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
+--INI--
+include_path=.
+--FILE--
+<?php
+
+class MyAutoLoader {
+
+ static protected function noAccess($className) {
+ echo __METHOD__ . "($className)\n";
+ }
+
+ static function autoLoad($className) {
+ echo __METHOD__ . "($className)\n";
+ }
+
+ function dynaLoad($className) {
+ echo __METHOD__ . "($className)\n";
+ }
+}
+
+$obj = new MyAutoLoader;
+
+$funcs = array(
+ 'MyAutoLoader::notExist',
+ 'MyAutoLoader::noAccess',
+ 'MyAutoLoader::autoLoad',
+ 'MyAutoLoader::dynaLoad',
+ array('MyAutoLoader', 'notExist'),
+ array('MyAutoLoader', 'noAccess'),
+ array('MyAutoLoader', 'autoLoad'),
+ array('MyAutoLoader', 'dynaLoad'),
+ array($obj, 'notExist'),
+ array($obj, 'noAccess'),
+ array($obj, 'autoLoad'),
+ array($obj, 'dynaLoad'),
+);
+
+foreach($funcs as $idx => $func)
+{
+ if ($idx) echo "\n";
+ try
+ {
+ var_dump($func);
+ spl_autoload_register($func);
+ echo "ok\n";
+ }
+ catch (Exception $e)
+ {
+ echo $e->getMessage() . "\n";
+ }
+}
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+string(22) "MyAutoLoader::notExist"
+Function 'MyAutoLoader::notExist' not found
+
+string(22) "MyAutoLoader::noAccess"
+Function 'MyAutoLoader::noAccess' not callable
+
+string(22) "MyAutoLoader::autoLoad"
+ok
+
+string(22) "MyAutoLoader::dynaLoad"
+Function 'MyAutoLoader::dynaLoad' not callable
+
+array(2) {
+ [0]=>
+ string(12) "MyAutoLoader"
+ [1]=>
+ string(8) "notExist"
+}
+Passed array does not specify an existing static method
+
+array(2) {
+ [0]=>
+ string(12) "MyAutoLoader"
+ [1]=>
+ string(8) "noAccess"
+}
+Passed array does not specify a callable static method
+
+array(2) {
+ [0]=>
+ string(12) "MyAutoLoader"
+ [1]=>
+ string(8) "autoLoad"
+}
+ok
+
+array(2) {
+ [0]=>
+ string(12) "MyAutoLoader"
+ [1]=>
+ string(8) "dynaLoad"
+}
+Passed array specifies a non static method but no object
+
+array(2) {
+ [0]=>
+ object(MyAutoLoader)#%d (0) {
+ }
+ [1]=>
+ string(8) "notExist"
+}
+Passed array does not specify an existing method
+
+array(2) {
+ [0]=>
+ object(MyAutoLoader)#%d (0) {
+ }
+ [1]=>
+ string(8) "noAccess"
+}
+Passed array does not specify a callable method
+
+array(2) {
+ [0]=>
+ object(MyAutoLoader)#%d (0) {
+ }
+ [1]=>
+ string(8) "autoLoad"
+}
+ok
+
+array(2) {
+ [0]=>
+ object(MyAutoLoader)#%d (0) {
+ }
+ [1]=>
+ string(8) "dynaLoad"
+}
+ok
+===DONE===
diff --git a/ext/spl/tests/sxe_001.phpt b/ext/spl/tests/sxe_001.phpt
index 72180d6a1..c6e6b41d0 100755
--- a/ext/spl/tests/sxe_001.phpt
+++ b/ext/spl/tests/sxe_001.phpt
@@ -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===
diff --git a/ext/spl/tests/sxe_004.phpt b/ext/spl/tests/sxe_004.phpt
index 487de4507..718a626b6 100755
--- a/ext/spl/tests/sxe_004.phpt
+++ b/ext/spl/tests/sxe_004.phpt
@@ -145,62 +145,3 @@ SXETest::next
SXETest::valid
SXETest::valid
===DONE===
---UEXPECTF--
-SXETest::rewind
-SXETest::valid
-SXETest::hasChildren
-SXETest::valid
-SXETest::current
-unicode(7) "SXETest"
-unicode(10) "Bla bla 1."
-SXETest::getChildren
-SXETest::rewind
-SXETest::valid
-SXETest::hasChildren
-SXETest::valid
-SXETest::current
-unicode(7) "SXETest"
-unicode(28) "Here we have some text data."
-SXETest::getChildren
-SXETest::rewind
-SXETest::valid
-SXETest::hasChildren
-SXETest::valid
-SXETest::current
-unicode(7) "SXETest"
-unicode(19) "And here some more."
-SXETest::getChildren
-SXETest::rewind
-SXETest::valid
-SXETest::hasChildren
-SXETest::valid
-SXETest::current
-unicode(7) "SXETest"
-unicode(15) "Wow once again."
-SXETest::next
-SXETest::valid
-SXETest::next
-SXETest::valid
-SXETest::next
-SXETest::valid
-SXETest::next
-SXETest::valid
-SXETest::hasChildren
-SXETest::valid
-SXETest::current
-unicode(7) "SXETest"
-unicode(10) "Bla bla 2."
-SXETest::getChildren
-SXETest::rewind
-SXETest::valid
-SXETest::hasChildren
-SXETest::valid
-SXETest::current
-unicode(7) "SXETest"
-unicode(7) "Foo Bar"
-SXETest::next
-SXETest::valid
-SXETest::next
-SXETest::valid
-SXETest::valid
-===DONE===