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

1.1     ! misho       1: --TEST--
        !             2: Testing clone on objects whoose class derived from DateTimeZone class 
        !             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 $property1 = 99;
        !            10:        public $property2 = "Hello";
        !            11: }
        !            12: 
        !            13: class DateTimeZoneExt2 extends DateTimeZoneExt1 {
        !            14:        public $property3 = true;
        !            15:        public $property4 = 10.5;
        !            16: }
        !            17: 
        !            18: echo "*** Testing clone on objects whoose class derived from DateTimeZone class ***\n";
        !            19: 
        !            20: $d1 = new DateTimeZoneExt1("Europe/London");
        !            21: var_dump($d1);
        !            22: $d1_clone = clone $d1;
        !            23: var_dump($d1_clone);
        !            24: 
        !            25: $d2 = new DateTimeZoneExt2("Europe/London");
        !            26: var_dump($d2);
        !            27: $d2_clone = clone $d2;
        !            28: var_dump($d2_clone);
        !            29: 
        !            30: ?>
        !            31: ===DONE===
        !            32: --EXPECTF--
        !            33: *** Testing clone on objects whoose class derived from DateTimeZone class ***
        !            34: object(DateTimeZoneExt1)#%d (2) {
        !            35:   ["property1"]=>
        !            36:   int(99)
        !            37:   ["property2"]=>
        !            38:   string(5) "Hello"
        !            39: }
        !            40: object(DateTimeZoneExt1)#%d (2) {
        !            41:   ["property1"]=>
        !            42:   int(99)
        !            43:   ["property2"]=>
        !            44:   string(5) "Hello"
        !            45: }
        !            46: object(DateTimeZoneExt2)#%d (4) {
        !            47:   ["property3"]=>
        !            48:   bool(true)
        !            49:   ["property4"]=>
        !            50:   float(10.5)
        !            51:   ["property1"]=>
        !            52:   int(99)
        !            53:   ["property2"]=>
        !            54:   string(5) "Hello"
        !            55: }
        !            56: object(DateTimeZoneExt2)#%d (4) {
        !            57:   ["property3"]=>
        !            58:   bool(true)
        !            59:   ["property4"]=>
        !            60:   float(10.5)
        !            61:   ["property1"]=>
        !            62:   int(99)
        !            63:   ["property2"]=>
        !            64:   string(5) "Hello"
        !            65: }
        !            66: ===DONE===

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