Annotation of embedaddon/php/ext/date/tests/DateTimeZone_getName_basic1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test DateTimeZone::getName() function : basic functionality
! 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: echo "*** Testing DateTimeZone::getName() : basic functionality ***\n";
! 12:
! 13: //Set the default time zone
! 14: date_default_timezone_set("GMT");
! 15:
! 16: $tz1 = new DateTimeZone("Europe/London");
! 17: var_dump( $tz1->getName() );
! 18:
! 19: $tz2 = new DateTimeZone("America/New_York");
! 20: var_dump( $tz2->getName() );
! 21:
! 22: $tz3 = new DateTimeZone("America/Los_Angeles");
! 23: var_dump( $tz3->getName() );
! 24:
! 25: ?>
! 26: ===DONE===
! 27: --EXPECT--
! 28: *** Testing DateTimeZone::getName() : basic functionality ***
! 29: string(13) "Europe/London"
! 30: string(16) "America/New_York"
! 31: string(19) "America/Los_Angeles"
! 32: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>