Annotation of embedaddon/php/ext/date/tests/gmmktime_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test gmmktime() function : error conditions
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
! 6: * Description: Get UNIX timestamp for a GMT date
! 7: * Source code: ext/date/php_date.c
! 8: * Alias to functions:
! 9: */
! 10:
! 11: echo "*** Testing gmmktime() : error conditions ***\n";
! 12:
! 13: //Test gmmktime with one more than the expected number of arguments
! 14: echo "\n-- Testing gmmktime() function with more than expected no. of arguments --\n";
! 15: $hour = 8;
! 16: $min = 8;
! 17: $sec = 8;
! 18: $mon = 8;
! 19: $day = 8;
! 20: $year = 2008;
! 21: $extra_arg1 = 10;
! 22: $extra_arg2 = 10;
! 23:
! 24: var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year, $extra_arg1) );
! 25:
! 26: var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year, $extra_arg1, $extra_arg2) );
! 27: ?>
! 28: ===DONE===
! 29: --EXPECTF--
! 30: *** Testing gmmktime() : error conditions ***
! 31:
! 32: -- Testing gmmktime() function with more than expected no. of arguments --
! 33:
! 34: Deprecated: gmmktime(): The is_dst parameter is deprecated in %s on line %d
! 35: int(1218182888)
! 36:
! 37: Warning: gmmktime() expects at most 7 parameters, 8 given in %s on line %d
! 38: bool(false)
! 39: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>