Annotation of embedaddon/php/ext/intl/tests/msgfmt_get_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: msgmfmt_get_error_message/code()
! 3: --SKIPIF--
! 4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: /*
! 9: * Error handling.
! 10: */
! 11:
! 12:
! 13: function ut_main()
! 14: {
! 15: $fmt = ut_msgfmt_create( "en_US", "{0, number} monkeys on {1, number} trees" );
! 16: $num = ut_msgfmt_format( $fmt, array());
! 17: if( $num === false )
! 18: return $fmt->getErrorMessage() . " (" . $fmt->getErrorCode() . ")\n";
! 19: else
! 20: return "Ooops, an error should have occured.";
! 21: }
! 22:
! 23: include_once( 'ut_common.inc' );
! 24:
! 25: // Run the test
! 26: ut_run();
! 27: ?>
! 28: --EXPECT--
! 29: msgfmt_format: not enough parameters: U_ILLEGAL_ARGUMENT_ERROR (1)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>