]> granicus.if.org Git - php/commitdiff
fix tests for array/object BC
authorStanislav Malyshev <stas@php.net>
Tue, 25 Nov 2008 22:13:44 +0000 (22:13 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 25 Nov 2008 22:13:44 +0000 (22:13 +0000)
14 files changed:
ext/standard/tests/array/array_key_exists.phpt
ext/standard/tests/array/array_key_exists_object1.phpt
ext/standard/tests/array/array_key_exists_object2.phpt
ext/standard/tests/array/array_key_exists_variation2.phpt
ext/standard/tests/array/array_walk_object1.phpt
ext/standard/tests/array/array_walk_objects.phpt
ext/standard/tests/array/array_walk_rec_objects.phpt
ext/standard/tests/array/array_walk_recursive_object1.phpt
ext/standard/tests/array/current_variation1.phpt
ext/standard/tests/array/end_variation1.phpt
ext/standard/tests/array/key_variation1.phpt
ext/standard/tests/array/next_variation1.phpt
ext/standard/tests/array/prev_variation1.phpt
ext/standard/tests/array/reset_variation1.phpt

index 40bd54fd945d9db5dd82b039033cccc90d768ebe..f433e1256282fc393db5c59e2fc8807e0ec41291 100644 (file)
@@ -280,23 +280,13 @@ Warning: array_key_exists(): The first argument should be either a string or an
 bool(false)
 
 *** Testing operation on objects ***
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
 bool(true)
 
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
 Done
index 8a6120599c73cfe0a77cefe1989eec2714a6de8f..3b263df474cccb192572df96d9bfae5f8c3c049e 100644 (file)
@@ -52,15 +52,11 @@ echo "Done";
 
 -- Do not assign a value to $class1->var3 --
 $key = var1:
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(true)
 $key = var3:
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(true)
 $class1:
-object(myClass)#%d (3) {
+object(myClass)#1 (3) {
   ["var1"]=>
   string(1) "a"
   ["var2"]=>
@@ -71,11 +67,9 @@ object(myClass)#%d (3) {
 
 -- Assign a value to $class2->var3 --
 $key = var3:
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(true)
 $class2:
-object(myClass)#%d (3) {
+object(myClass)#2 (3) {
   ["var1"]=>
   string(1) "x"
   ["var2"]=>
index c810f868f2d53bfb23c37a3d9508f9ab9a46cc7a..4a790e9d3780a2e515772599249f05784c703088 100644 (file)
@@ -54,19 +54,13 @@ echo "Done";
 
 -- Do not assign a value to $class1->var3 --
 $key = var1:
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(true)
 $key = var2:
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(false)
 $key = var3:
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(false)
 $class1:
-object(myClass)#%d (3) {
+object(myClass)#1 (3) {
   ["var1"]=>
   string(1) "a"
   ["var2":protected]=>
@@ -77,11 +71,9 @@ object(myClass)#%d (3) {
 
 -- Assign a value to $class2->var3 --
 $key = var3:
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(false)
 $class2:
-object(myClass)#%d (3) {
+object(myClass)#2 (3) {
   ["var1"]=>
   string(1) "x"
   ["var2":protected]=>
index 9d26d3764019d79677e3155bdd261131e5ddb1ef..a6e9cd2bbff566665b17de77f0bfbfa31fd55007 100644 (file)
@@ -206,9 +206,7 @@ Warning: array_key_exists() expects parameter 2 to be array, string given in %s
 NULL
 
 -- Iteration 22 --
-
-Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d
-NULL
+bool(false)
 
 -- Iteration 23 --
 
index f6cbce018f7f8181f16a84150d4ebba23178d1aa..9a76410c622372e6d4277d08db21993c0ae130a7 100644 (file)
Binary files a/ext/standard/tests/array/array_walk_object1.phpt and b/ext/standard/tests/array/array_walk_object1.phpt differ
index a90e3e2829d60155934d4086af97ea9d5d016c91..83915af7c3610d2b6166259ba41139df5670d36e 100644 (file)
Binary files a/ext/standard/tests/array/array_walk_objects.phpt and b/ext/standard/tests/array/array_walk_objects.phpt differ
index efee37c3d54568a78a85d1a158a4228e095e7285..8a819bc03e28ac323caf21c0cee05570daba21d4 100644 (file)
Binary files a/ext/standard/tests/array/array_walk_rec_objects.phpt and b/ext/standard/tests/array/array_walk_rec_objects.phpt differ
index 16a56d37d005fddcfaf5f907d8339e7e2976f992..cc1b51ca78bbdda042bbc445eaa0d2be199c116e 100644 (file)
Binary files a/ext/standard/tests/array/array_walk_recursive_object1.phpt and b/ext/standard/tests/array/array_walk_recursive_object1.phpt differ
index 6afed34d4523c7091a51886c9709d1d9277fe85e..111b8de4f71a07e26e72172e9a0c1fda3c501ed5 100644 (file)
@@ -198,8 +198,6 @@ Warning: current() expects parameter 1 to be array, string given in %s on line %
 NULL
 
 -- Iteration 21 --
-
-Warning: current() expects parameter 1 to be array, object given in %s on line %d
 NULL
 
 -- Iteration 22 --
index eb10b5e583f7544ee33def0092ee162a2c695a00..79354aba4f0f369f6c7c87bf8dabc02fe40c1dfe 100644 (file)
@@ -201,9 +201,7 @@ Warning: end() expects parameter 1 to be array, string given in %s on line %d
 NULL
 
 -- Iteration 22 --
-
-Warning: end() expects parameter 1 to be array, object given in %s on line %d
-NULL
+string(12) "hello, world"
 
 -- Iteration 23 --
 
index 9aade55f1be865bf5c17d1303bd6f7ec1b8c9a57..a0c59b49563bb13e468d8e29dbc381bc186f9804 100644 (file)
@@ -201,9 +201,7 @@ Warning: key() expects parameter 1 to be array, string given in %s on line %d
 NULL
 
 -- Iteration 22 --
-
-Warning: key() expects parameter 1 to be array, object given in %s on line %d
-NULL
+string(4) "var1"
 
 -- Iteration 23 --
 
index 313add035a1404b867246c8f1b02af7c3bd85911..5f477b442ed988c72d58c3250f34bb69129800f5 100644 (file)
@@ -200,9 +200,7 @@ Warning: next() expects parameter 1 to be array, string given in %s on line %d
 NULL
 
 -- Iteration 22 --
-
-Warning: next() expects parameter 1 to be array, object given in %s on line %d
-NULL
+bool(false)
 
 -- Iteration 23 --
 
index 009469d98fcaf4238aebe7486e267a22b02431bc..5a6253628e9ba50862d9649fdd6f3dbdc3029795 100755 (executable)
@@ -200,9 +200,7 @@ Warning: prev() expects parameter 1 to be array, string given in %s on line %d
 NULL
 
 -- Iteration 22 --
-
-Warning: prev() expects parameter 1 to be array, object given in %s on line %d
-NULL
+bool(false)
 
 -- Iteration 23 --
 
index 1c19c95de72968db3b84fa6f65b9cbe2b4546c1c..b6cddf0cb5ccc9ca7537da7813670ce7e60c9ade 100644 (file)
@@ -200,9 +200,7 @@ Warning: reset() expects parameter 1 to be array, string given in %s on line %d
 NULL
 
 -- Iteration 22 --
-
-Warning: reset() expects parameter 1 to be array, object given in %s on line %d
-NULL
+bool(false)
 
 -- Iteration 23 --