Annotation of embedaddon/php/ext/date/tests/getdate_error.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test getdate() function : error conditions 
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : array getdate([int timestamp])
        !             6:  * Description: Get date/time information 
        !             7:  * Source code: ext/date/php_date.c
        !             8:  * Alias to functions: 
        !             9:  */
        !            10: 
        !            11: echo "*** Testing getdate() : error conditions ***\n";
        !            12: 
        !            13: //Set the default time zone 
        !            14: date_default_timezone_set("America/Chicago");
        !            15: 
        !            16: //Test getdate with one more than the expected number of arguments
        !            17: echo "\n-- Testing getdate() function with more than expected no. of arguments --\n";
        !            18: $timestamp = 10;
        !            19: $extra_arg = 10;
        !            20: var_dump( getdate($timestamp, $extra_arg) );
        !            21: 
        !            22: ?>
        !            23: ===DONE===
        !            24: --EXPECTF--
        !            25: *** Testing getdate() : error conditions ***
        !            26: 
        !            27: -- Testing getdate() function with more than expected no. of arguments --
        !            28: 
        !            29: Warning: getdate() expects at most 1 parameter, 2 given in %s on line %d
        !            30: bool(false)
        !            31: ===DONE===

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