Annotation of embedaddon/php/ext/date/tests/oo_002.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: date OO cloning
! 3: --FILE--
! 4: <?php
! 5: date_default_timezone_set('Europe/Berlin');
! 6: class _d extends DateTime {}
! 7: class _t extends DateTimeZone {}
! 8: $d = new _d("1pm Aug 1 GMT 2007");
! 9: var_dump($d->format(DateTime::RFC822));
! 10: $c = clone $d;
! 11: var_dump($c->format(DateTime::RFC822));
! 12: $d->modify("1 hour");
! 13: $c->modify("1 second ago");
! 14: var_dump($d->format(DateTime::RFC822));
! 15: var_dump($c->format(DateTime::RFC822));
! 16: $t = new _t("Asia/Tokyo");
! 17: var_dump($t->getName());
! 18: $c = clone $t;
! 19: var_dump($c->getName());
! 20: ?>
! 21: --EXPECT--
! 22: string(29) "Wed, 01 Aug 07 13:00:00 +0000"
! 23: string(29) "Wed, 01 Aug 07 13:00:00 +0000"
! 24: string(29) "Wed, 01 Aug 07 14:00:00 +0000"
! 25: string(29) "Wed, 01 Aug 07 12:59:59 +0000"
! 26: string(10) "Asia/Tokyo"
! 27: string(10) "Asia/Tokyo"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>