From: Raghubansh Kumar Date: Mon, 22 Oct 2007 11:17:18 +0000 (+0000) Subject: more testcases for array_filter() function X-Git-Tag: RELEASE_2_0_0a1~1561 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac26a3f8932473e643926c484ce3145e4383723a;p=php more testcases for array_filter() function --- diff --git a/ext/standard/tests/array/array_filter_object.phpt b/ext/standard/tests/array/array_filter_object.phpt new file mode 100644 index 0000000000..7d7759d26b --- /dev/null +++ b/ext/standard/tests/array/array_filter_object.phpt @@ -0,0 +1,210 @@ +--TEST-- +Test array_filter() function : object functionality +--FILE-- + +--EXPECTF-- +*** Testing array_filter() : object functionality *** +array(5) { + [0]=> + object(SimpleClass)#%d (1) { + ["var1"]=> + int(10) + } + [1]=> + object(EmptyClass)#%d (0) { + } + [2]=> + object(ChildClass)#%d (2) { + ["var3":"ChildClass":private]=> + NULL + ["var2":protected]=> + int(5) + } + [3]=> + object(FinalClass)#%d (1) { + ["var4":"FinalClass":private]=> + NULL + } + [4]=> + object(StaticClass)#%d (0) { + } +} +array(5) { + [0]=> + object(SimpleClass)#%d (1) { + ["var1"]=> + int(10) + } + [1]=> + object(EmptyClass)#%d (0) { + } + [2]=> + object(ChildClass)#%d (2) { + ["var3":"ChildClass":private]=> + NULL + ["var2":protected]=> + int(5) + } + [3]=> + object(FinalClass)#%d (1) { + ["var4":"FinalClass":private]=> + NULL + } + [4]=> + object(StaticClass)#%d (0) { + } +} +array(0) { +} +Done +--UEXPECTF-- +*** Testing array_filter() : object functionality *** +array(5) { + [0]=> + object(SimpleClass)#%d (1) { + [u"var1"]=> + int(10) + } + [1]=> + object(EmptyClass)#%d (0) { + } + [2]=> + object(ChildClass)#%d (2) { + [u"var3":u"ChildClass":private]=> + NULL + [u"var2":protected]=> + int(5) + } + [3]=> + object(FinalClass)#%d (1) { + [u"var4":u"FinalClass":private]=> + NULL + } + [4]=> + object(StaticClass)#%d (0) { + } +} +array(5) { + [0]=> + object(SimpleClass)#%d (1) { + [u"var1"]=> + int(10) + } + [1]=> + object(EmptyClass)#%d (0) { + } + [2]=> + object(ChildClass)#%d (2) { + [u"var3":u"ChildClass":private]=> + NULL + [u"var2":protected]=> + int(5) + } + [3]=> + object(FinalClass)#%d (1) { + [u"var4":u"FinalClass":private]=> + NULL + } + [4]=> + object(StaticClass)#%d (0) { + } +} +array(0) { +} +Done