Return to get_parent_class_error_001.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / class_object |
1.1 misho 1: --TEST-- 2: Test get_parent_class() function : error conditions - wrong number of args. 3: --FILE-- 4: <?php 5: /* Prototype : proto string get_parent_class([mixed object]) 6: * Description: Retrieves the parent class name for object or class or current scope. 7: * Source code: Zend/zend_builtin_functions.c 8: * Alias to functions: 9: */ 10: 11: echo "*** Testing get_parent_class() : error conditions ***\n"; 12: 13: 14: //Test get_parent_class with one more than the expected number of arguments 15: echo "\n-- Testing get_parent_class() function with more than expected no. of arguments --\n"; 16: $object = 1; 17: $extra_arg = 10; 18: var_dump( get_parent_class($object, $extra_arg) ); 19: 20: echo "Done"; 21: ?> 22: --EXPECTF-- 23: *** Testing get_parent_class() : error conditions *** 24: 25: -- Testing get_parent_class() function with more than expected no. of arguments -- 26: 27: Warning: get_parent_class() expects at most 1 parameter, 2 given in %s on line 15 28: NULL 29: Done