Annotation of embedaddon/php/ext/date/tests/DateTimeZone_listIdentifiers_basic1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test DateTimeZone::listIdentifiers function : basic functionality
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : array DateTimeZone::listIdentifiers ( void )
! 6: * Description: Returns numerically index array with all timezone identifiers
! 7: * Source code: ext/date/php_date.c
! 8: * Alias to functions: timezone_identifiers_list
! 9: */
! 10:
! 11: echo "*** Testing DateTimeZone::listIdentifiers() : basic functionality ***\n";
! 12:
! 13: //Set the default time zone
! 14: date_default_timezone_set("GMT");
! 15:
! 16: $zones = DateTimeZone::listIdentifiers();
! 17: echo "Check return tpe is ARRAY\n";
! 18: var_dump(is_array($zones));
! 19:
! 20: echo "Check array contains some common timezones\n";
! 21: var_dump(in_array("Europe/London", $zones));
! 22: var_dump(in_array("America/New_York", $zones));
! 23: var_dump(in_array("UTC", $zones));
! 24:
! 25: ?>
! 26: ===DONE===
! 27: --EXPECT--
! 28: *** Testing DateTimeZone::listIdentifiers() : basic functionality ***
! 29: Check return tpe is ARRAY
! 30: bool(true)
! 31: Check array contains some common timezones
! 32: bool(true)
! 33: bool(true)
! 34: bool(true)
! 35: ===DONE===
! 36:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>