Annotation of embedaddon/php/ext/date/tests/DateTimeZone_clone_basic1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test clone on DateTimeZone objects
! 3: --FILE--
! 4: <?php
! 5:
! 6: //Set the default time zone
! 7: date_default_timezone_set('Europe/London');
! 8:
! 9: echo "*** Testing clone on DateTime objects ***\n";
! 10:
! 11: // Create a DateTimeZone object..
! 12: $orig = new DateTimeZone("GMT");
! 13:
! 14: // ..create a clone of it ..Clone
! 15: $clone = clone $orig;
! 16:
! 17: var_dump($orig);
! 18: var_dump($clone);
! 19:
! 20: if ($clone != $orig) {
! 21: echo "TEST FAILED : objects not equal\n";
! 22: }else if ($clone === $orig) {
! 23: echo "TEST FAILED : objects identical\n";
! 24: } else {
! 25: echo "TEST PASSED : Objects equal but not indetical\n";
! 26: }
! 27:
! 28: ?>
! 29: ===DONE===
! 30: --EXPECTF--
! 31: *** Testing clone on DateTime objects ***
! 32: object(DateTimeZone)#%d (0) {
! 33: }
! 34: object(DateTimeZone)#%d (0) {
! 35: }
! 36: TEST PASSED : Objects equal but not indetical
! 37: ===DONE===
! 38:
! 39:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>