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

1.1     ! misho       1: --TEST--
        !             2: Bug #43808 (date_create never fails (even when it should))
        !             3: --FILE--
        !             4: <?php
        !             5: $date = date_create('asdfasdf');
        !             6: 
        !             7: if ($date instanceof DateTime) {
        !             8:        echo "this is wrong, should be bool";
        !             9: }
        !            10: 
        !            11: var_dump( $date );
        !            12: var_dump( DateTime::getLastErrors() );
        !            13: var_dump( date_get_last_errors() );
        !            14: ?>
        !            15: --EXPECT--
        !            16: bool(false)
        !            17: array(4) {
        !            18:   ["warning_count"]=>
        !            19:   int(1)
        !            20:   ["warnings"]=>
        !            21:   array(1) {
        !            22:     [6]=>
        !            23:     string(29) "Double timezone specification"
        !            24:   }
        !            25:   ["error_count"]=>
        !            26:   int(1)
        !            27:   ["errors"]=>
        !            28:   array(1) {
        !            29:     [0]=>
        !            30:     string(47) "The timezone could not be found in the database"
        !            31:   }
        !            32: }
        !            33: array(4) {
        !            34:   ["warning_count"]=>
        !            35:   int(1)
        !            36:   ["warnings"]=>
        !            37:   array(1) {
        !            38:     [6]=>
        !            39:     string(29) "Double timezone specification"
        !            40:   }
        !            41:   ["error_count"]=>
        !            42:   int(1)
        !            43:   ["errors"]=>
        !            44:   array(1) {
        !            45:     [0]=>
        !            46:     string(47) "The timezone could not be found in the database"
        !            47:   }
        !            48: }

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