Annotation of embedaddon/php/ext/date/tests/DateTimeZone_extends_basic1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test DateTimeZone class inheritance
! 3: --FILE--
! 4: <?php
! 5:
! 6: //Set the default time zone
! 7: date_default_timezone_set("Europe/London");
! 8:
! 9: echo "*** Testing basic DateTimeZone inheritance() ***\n";
! 10:
! 11: class DateTimeZoneExt extends DateTimeZone
! 12: {
! 13: public function __toString()
! 14: {
! 15: return parent::getName();
! 16: }
! 17: }
! 18:
! 19: echo "\n-- Create an instance of DateTimeZoneExt --\n";
! 20: $d = new DateTimeZoneExt("America/Los_Angeles");
! 21:
! 22: echo "\n-- Invoke __toString --\n";
! 23: echo $d . "\n";
! 24:
! 25: ?>
! 26: ===DONE===
! 27: --EXPECTF--
! 28: *** Testing basic DateTimeZone inheritance() ***
! 29:
! 30: -- Create an instance of DateTimeZoneExt --
! 31:
! 32: -- Invoke __toString --
! 33: America/Los_Angeles
! 34: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>