Annotation of embedaddon/php/ext/gd/tests/gd_info_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test gd_info() function : error conditions - with more than expected number of arguments
! 3: --SKIPIF--
! 4: <?php
! 5: if(!extension_loaded('gd')) {
! 6: die('skip gd extension is not loaded');
! 7: }
! 8: if(!function_exists('gd_info')) {
! 9: die('skip gd_info function is not available');
! 10: }
! 11: ?>
! 12: --FILE--
! 13: <?php
! 14: /* Prototype : array gd_info()
! 15: * Description: Retrieve information about the currently installed GD library
! 16: * Source code: ext/gd/gd.c
! 17: */
! 18: $extra_arg_number = 10;
! 19: $extra_arg_string = "Hello";
! 20:
! 21: echo "*** Testing gd_info() : error conditions ***\n";
! 22:
! 23: echo "\n-- Testing gd_info() function with more than expected number of arguments --\n";
! 24: var_dump(gd_info($extra_arg_number));
! 25: var_dump(gd_info($extra_arg_string, $extra_arg_number));
! 26: ?>
! 27: ===DONE===
! 28: --EXPECTF--
! 29: *** Testing gd_info() : error conditions ***
! 30:
! 31: -- Testing gd_info() function with more than expected number of arguments --
! 32:
! 33: Warning: gd_info() expects exactly 0 parameters, 1 given in %s on line %d
! 34: bool(false)
! 35:
! 36: Warning: gd_info() expects exactly 0 parameters, 2 given in %s on line %d
! 37: bool(false)
! 38: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>