Annotation of embedaddon/php/ext/date/tests/DateTimeZone_getName_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test DateTimeZone::getName() function : error conditions
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : public string DateTimeZone::getName ( void )
! 6: * Description: Returns the name of the timezone
! 7: * Source code: ext/date/php_date.c
! 8: * Alias to functions: timezone_name_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::getName() : error conditions ***\n";
! 17:
! 18: echo "\n-- Testing DateTimeZone::getName() function with more than expected no. of arguments --\n";
! 19: $extra_arg = 99;
! 20: var_dump( $tz->getName($extra_arg) );
! 21:
! 22: ?>
! 23: ===DONE===
! 24: --EXPECTF--
! 25: *** Testing DateTimeZone::getName() : error conditions ***
! 26:
! 27: -- Testing DateTimeZone::getName() function with more than expected no. of arguments --
! 28:
! 29: Warning: DateTimeZone::getName() expects exactly 0 parameters, 1 given in %s on line %d
! 30: bool(false)
! 31: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>