Annotation of embedaddon/php/ext/standard/tests/class_object/get_class_methods_error_001.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test get_class_methods() function : error conditions 
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : proto array get_class_methods(mixed class)
        !             6:  * Description: Returns an array of method names for class or class instance. 
        !             7:  * Source code: Zend/zend_builtin_functions.c
        !             8:  * Alias to functions: 
        !             9:  */
        !            10: 
        !            11: /*
        !            12:  * Test wrong number of arguments.
        !            13:  */
        !            14: 
        !            15: echo "*** Testing get_class_methods() : error conditions ***\n";
        !            16: 
        !            17: // Zero arguments
        !            18: echo "\n-- Testing get_class_methods() function with Zero arguments --\n";
        !            19: var_dump( get_class_methods() );
        !            20: 
        !            21: //Test get_class_methods with one more than the expected number of arguments
        !            22: echo "\n-- Testing get_class_methods() function with more than expected no. of arguments --\n";
        !            23: $class = 1;
        !            24: $extra_arg = 10;
        !            25: var_dump( get_class_methods($class, $extra_arg) );
        !            26: 
        !            27: echo "Done";
        !            28: ?>
        !            29: --EXPECTF--
        !            30: *** Testing get_class_methods() : error conditions ***
        !            31: 
        !            32: -- Testing get_class_methods() function with Zero arguments --
        !            33: 
        !            34: Warning: get_class_methods() expects exactly 1 parameter, 0 given in %s on line 16
        !            35: NULL
        !            36: 
        !            37: -- Testing get_class_methods() function with more than expected no. of arguments --
        !            38: 
        !            39: Warning: get_class_methods() expects exactly 1 parameter, 2 given in %s on line 22
        !            40: NULL
        !            41: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>