Annotation of embedaddon/php/ext/date/tests/DateTimeZone_getTransitions_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test DateTimeZone::getTransitions() function : error conditions 
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : array DateTimeZone::getTransitions  ([ int $timestamp_begin  [, int $timestamp_end  ]] )
                      6:  * Description: Returns all transitions for the timezone
                      7:  * Source code: ext/date/php_date.c
                      8:  * Alias to functions: timezone_transitions_get()
                      9:  */
                     10:  
                     11: //Set the default time zone 
                     12: date_default_timezone_set("GMT");
                     13: 
                     14: $tz = new DateTimeZone("Europe/London");
                     15:  
                     16: echo "*** Testing DateTimeZone::getTransitions() : error conditions ***\n";
                     17: 
                     18: echo "\n-- Testing DateTimeZone::getTransitions() function with more than expected no. of arguments --\n";
                     19: $timestamp_begin = mktime(0, 0, 0, 1, 1, 1972);
                     20: $timestamp_end = mktime(0, 0, 0, 1, 1, 1975);
                     21: $extra_arg = 99;
                     22: 
                     23: var_dump( $tz->getTransitions($timestamp_begin, $timestamp_end, $extra_arg) );
                     24: 
                     25: ?>
                     26: ===DONE===
                     27: --EXPECTF--
                     28: *** Testing DateTimeZone::getTransitions() : error conditions ***
                     29: 
                     30: -- Testing DateTimeZone::getTransitions() function with more than expected no. of arguments --
                     31: 
                     32: Warning: DateTimeZone::getTransitions() expects at most 2 parameters, 3 given in %s on line %d
                     33: bool(false)
                     34: ===DONE===

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