1--TEST--
2IntlBreakIterator::getPartsIterator(): basic test, ICU >= 58.1
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled');
7if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
8?>
9--FILE--
10<?php
11ini_set("intl.error_level", E_WARNING);
12ini_set("intl.default_locale", "pt_PT");
13
14$bi = IntlBreakIterator::createWordInstance('pt');
15$pi = $bi->getPartsIterator();
16var_dump(get_class($pi));
17print_r(iterator_to_array($pi));
18
19$bi->setText("foo bar");
20$pi = $bi->getPartsIterator();
21var_dump(get_class($pi->getBreakIterator()));
22print_r(iterator_to_array($pi));
23var_dump($pi->getRuleStatus());
24?>
25==DONE==
26--EXPECTF--
27string(17) "IntlPartsIterator"
28Array
29(
30)
31string(26) "IntlRuleBasedBreakIterator"
32Array
33(
34    [0] => foo
35    [1] =>
36    [2] => bar
37)
38int(%d)
39==DONE==
40