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

1.1     ! misho       1: --TEST--
        !             2: Test DateTime class inheritance : with user space fromat() method  
        !             3: --FILE--
        !             4: <?php
        !             5: //Set the default time zone 
        !             6: date_default_timezone_set("Europe/London");
        !             7: 
        !             8: echo "*** Testing new DateTime() : with user format() method ***\n";
        !             9: 
        !            10: class DateTimeExt extends DateTime
        !            11: {
        !            12:        public function format($format = "F j, Y, g:i:s a")
        !            13:        {
        !            14:                return parent::format($format);
        !            15:        }
        !            16: }
        !            17: 
        !            18: $d = new DateTimeExt("1967-05-01 22:30:41");
        !            19: echo $d->format() . "\n";
        !            20: 
        !            21: ?>
        !            22: ===DONE===
        !            23: --EXPECTF--
        !            24: *** Testing new DateTime() : with user format() method ***
        !            25: May 1, 1967, 10:30:41 pm
        !            26: ===DONE===

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