Annotation of embedaddon/php/ext/date/tests/gettimeofday_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test gettimeofday() function : error conditions
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : array gettimeofday([bool get_as_float])
! 6: * Description: Returns the current time as array
! 7: * Source code: ext/standard/microtime.c
! 8: * Alias to functions:
! 9: */
! 10:
! 11: echo "*** Testing gettimeofday() : error conditions ***\n";
! 12:
! 13:
! 14: //Test gettimeofday with one more than the expected number of arguments
! 15: echo "\n-- Testing gettimeofday() function with more than expected no. of arguments --\n";
! 16: $get_as_float = true;
! 17: $extra_arg = 10;
! 18: var_dump( gettimeofday($get_as_float, $extra_arg) );
! 19:
! 20: ?>
! 21: ===DONE===
! 22: --EXPECTF--
! 23: *** Testing gettimeofday() : error conditions ***
! 24:
! 25: -- Testing gettimeofday() function with more than expected no. of arguments --
! 26:
! 27: Warning: gettimeofday() expects at most 1 parameter, 2 given in %s on line %d
! 28: NULL
! 29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>