From 993e1866df547532a05ab6db76c9ff5aefc9a3df Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 25 Mar 2009 00:39:08 -0400 Subject: Imported Upstream version 5.2.6 --- ext/standard/tests/array/array_map_object1.phpt | 200 ++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 ext/standard/tests/array/array_map_object1.phpt (limited to 'ext/standard/tests/array/array_map_object1.phpt') diff --git a/ext/standard/tests/array/array_map_object1.phpt b/ext/standard/tests/array/array_map_object1.phpt new file mode 100644 index 000000000..1265e3a74 --- /dev/null +++ b/ext/standard/tests/array/array_map_object1.phpt @@ -0,0 +1,200 @@ +--TEST-- +Test array_map() function : usage variations - object functionality +--FILE-- + +--EXPECTF-- +*** Testing array_map() : object functionality *** +-- simple class with public variable and method -- + +Strict Standards: Non-static method SimpleClass::square() cannot be called statically in %s on line %d + +Strict Standards: Non-static method SimpleClass::square() cannot be called statically in %s on line %d + +Strict Standards: Non-static method SimpleClass::square() cannot be called statically in %s on line %d +array(2) { + [0]=> + int(1) + [1]=> + int(4) +} + +-- simple class with private variable and method -- + +Strict Standards: Non-static method SimpleClassPri::add() cannot be called statically in %s on line %d + +Warning: array_map(): The first argument, 'SimpleClassPri::add', should be either NULL or a valid callback in %s on line %d +NULL + +-- simple class with protected variable and method -- + +Strict Standards: Non-static method SimpleClassPro::mul() cannot be called statically in %s on line %d + +Warning: array_map(): The first argument, 'SimpleClassPro::mul', should be either NULL or a valid callback in %s on line %d +NULL + +-- class without members -- +Warning: array_map(): The first argument, 'Array', should be either NULL or a valid callback in %s on line %d +NULL + +-- abstract class -- +Strict Standards: Non-static method ChildClass::emptyFunction() cannot be called statically in %s on line %d + +Strict Standards: Non-static method ChildClass::emptyFunction() cannot be called statically in %s on line %d +defined in child +Strict Standards: Non-static method ChildClass::emptyFunction() cannot be called statically in %s on line %d +defined in childarray(2) { + [0]=> + NULL + [1]=> + NULL +} + +-- class with final method -- +Strict Standards: Non-static method FinalClass::finalMethod() cannot be called statically in %s on line %d + +Strict Standards: Non-static method FinalClass::finalMethod() cannot be called statically in %s on line %d +This function can't be overloaded +Strict Standards: Non-static method FinalClass::finalMethod() cannot be called statically in %s on line %d +This function can't be overloadedarray(2) { + [0]=> + NULL + [1]=> + NULL +} + +-- class with static members -- +array(2) { + [0]=> + int(1) + [1]=> + int(4) +} + +Warning: array_map(): The first argument, 'StaticClass::cube', should be either NULL or a valid callback in %s on line %d +NULL + +Warning: array_map(): The first argument, 'StaticClass::retVal', should be either NULL or a valid callback in %s on line %d +NULL +-- class implementing an interface -- +array(2) { + [0]=> + int(1) + [1]=> + int(4) +} +Done -- cgit v1.2.3