1--TEST--
2msgmfmt_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
13function 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
23include_once( 'ut_common.inc' );
24
25// Run the test
26ut_run();
27?>
28--EXPECT--
29msgfmt_format: not enough parameters: U_ILLEGAL_ARGUMENT_ERROR (1)
30