Annotation of embedaddon/php/ext/date/tests/DateTimeZone_clone_basic4.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test clone of DateTimeZone derived objects with __clone magic method
        !             3: --FILE--
        !             4: <?php
        !             5: //Set the default time zone 
        !             6: date_default_timezone_set("Europe/London");
        !             7: 
        !             8: class DateTimeZoneExt1 extends DateTimeZone {
        !             9:        public function __clone() {
        !            10:                echo "-- DateTimeExt1 __clone magic method called --\n"; 
        !            11:        }
        !            12: }
        !            13: 
        !            14: echo "*** Testing clone of objects derived from DateTimeZone class with __clone magic method***\n";
        !            15: 
        !            16: $d1 = new DateTimeZoneExt1("America/New_York");
        !            17: $d1_clone = clone $d1;
        !            18: 
        !            19: //verify clone by calling method on new object
        !            20: var_dump( $d1_clone->getName() ); 
        !            21: 
        !            22: ?>
        !            23: ===DONE===
        !            24: --EXPECTF--
        !            25: *** Testing clone of objects derived from DateTimeZone class with __clone magic method***
        !            26: -- DateTimeExt1 __clone magic method called --
        !            27: string(16) "America/New_York"
        !            28: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>