summaryrefslogtreecommitdiff
path: root/ext/intl/tests/intl_get_error_code.phpt
blob: 797aee4fb717e7c06e8dbb4b27f2de8a7621c654 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
intl_get_error_code()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php
/*
 * Check getting global error code.
 */

// Suppress warning messages.
error_reporting( E_ERROR );

if( collator_get_locale(new Collator('en_US'), -1) !== false )
    echo "failed\n";
else
{
    $check_code = ( intl_get_error_code() != 0 );
    echo ( $check_code ?  "ok" : "failed" ) . "\n";
}

?>
--EXPECT--
ok