forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbreakiter_getLocale_error.phpt
33 lines (24 loc) · 1.01 KB
/
breakiter_getLocale_error.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--TEST--
IntlBreakIterator::getLocale(): arg errors
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
$bi->setText("\x80sdfé\x90d888 dfsa9");
var_dump($bi->getLocale(1, 2));
var_dump($bi->getLocale(array()));
var_dump($bi->getLocale());
--EXPECTF--
Warning: IntlBreakIterator::getLocale() expects exactly 1 parameter, 2 given in %s on line %d
Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
bool(false)
Warning: IntlBreakIterator::getLocale() expects parameter 1 to be int, array given in %s on line %d
Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
bool(false)
Warning: IntlBreakIterator::getLocale() expects exactly 1 parameter, 0 given in %s on line %d
Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
bool(false)