From: Marcus Boerger Date: Tue, 13 Apr 2004 19:06:39 +0000 (+0000) Subject: New tests (and ordering of tests) X-Git-Tag: php-5.0.0RC2RC1~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0c91bac50cecbe7595d61d58db3873087ce227c;p=php New tests (and ordering of tests) --- diff --git a/ext/spl/tests/array_object.phpt b/ext/spl/tests/array_001.phpt similarity index 100% rename from ext/spl/tests/array_object.phpt rename to ext/spl/tests/array_001.phpt diff --git a/ext/spl/tests/array_002.phpt b/ext/spl/tests/array_002.phpt new file mode 100755 index 0000000000..960253f335 --- /dev/null +++ b/ext/spl/tests/array_002.phpt @@ -0,0 +1,37 @@ +--TEST-- +SPL: ArrayObject copy constructor +--SKIPIF-- + +--FILE-- + 'one', + '2' => 'two', + '3' => 'three'); + +$object = new ArrayObject($array); +$object[] = 'four'; + +$arrayObject = new ArrayObject($object); + +$arrayObject[] = 'five'; + +var_dump($arrayObject); + +?> +===DONE=== + +--EXPECTF-- +object(ArrayObject)#%d (5) { + [1]=> + string(3) "one" + [2]=> + string(3) "two" + [3]=> + string(5) "three" + [4]=> + string(4) "four" + [5]=> + string(4) "five" +} +===DONE=== diff --git a/ext/spl/tests/array_003.phpt b/ext/spl/tests/array_003.phpt new file mode 100755 index 0000000000..b7de6a78ae --- /dev/null +++ b/ext/spl/tests/array_003.phpt @@ -0,0 +1,49 @@ +--TEST-- +SPL: ArrayObject from object +--SKIPIF-- + +--FILE-- +imp = "implicit"; + } +}; + +$test = new test; +$test->dyn = "dynamic"; + +print_r($test); + +$object = new ArrayObject($test); + +print_r($object); + +?> +===DONE=== + +--EXPECTF-- +test Object +( + [pub] => public + [pro:protected] => protected + [pri:private] => private + [imp] => implicit + [dyn] => dynamic +) +ArrayObject Object +( + [pub] => public + [pro:protected] => protected + [pri:private] => private + [imp] => implicit + [dyn] => dynamic +) +===DONE=== diff --git a/ext/spl/tests/array_iterator.phpt b/ext/spl/tests/array_004.phpt similarity index 100% rename from ext/spl/tests/array_iterator.phpt rename to ext/spl/tests/array_004.phpt diff --git a/ext/spl/tests/array_object_iterator.phpt b/ext/spl/tests/array_005.phpt similarity index 100% rename from ext/spl/tests/array_object_iterator.phpt rename to ext/spl/tests/array_005.phpt