Annotation of embedaddon/php/ext/standard/tests/general_functions/get_extension_funcs_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test get_extension_funcs() function : error conditions 
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : array get_extension_funcs  ( string $module_name  )
                      6:  * Description: Returns an array with the names of the functions of a module.
                      7:  * Source code: Zend/zend_builtin_functions.c
                      8:  * Alias to functions: 
                      9:  */
                     10: 
                     11: echo "*** Testing get_extension_funcs() : error conditions ***\n";
                     12: 
                     13: echo "\n-- Too few arguments --\n";
                     14: var_dump(get_extension_funcs());
                     15: 
                     16: $extra_arg = 1;
                     17: echo "\n-- Too many arguments --\n";
                     18: var_dump(get_extension_funcs("standard", $extra_arg));
                     19: 
                     20: echo "\n-- Invalid extension name --\n";
                     21: var_dump(get_extension_funcs("foo"));
                     22: 
                     23: ?>
                     24: ===DONE===
                     25: --EXPECTF--
                     26: *** Testing get_extension_funcs() : error conditions ***
                     27: 
                     28: -- Too few arguments --
                     29: 
                     30: Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d
                     31: NULL
                     32: 
                     33: -- Too many arguments --
                     34: 
                     35: Warning: get_extension_funcs() expects exactly 1 parameter, 2 given in %s on line %d
                     36: NULL
                     37: 
                     38: -- Invalid extension name --
                     39: bool(false)
                     40: ===DONE===

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