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

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

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