1--TEST--
2IntlBreakIterator::setText(): basic test
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6    die('skip intl extension not enabled');
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10
11class A {
12function __tostring() { return 'aaa'; }
13}
14
15$bi = IntlBreakIterator::createWordInstance('pt');
16var_dump($bi->setText('foo bar'));
17var_dump($bi->getText());
18var_dump($bi->setText(1));
19var_dump($bi->getText());
20var_dump($bi->setText(new A));
21var_dump($bi->getText());
22
23/* setText resets the pointer */
24var_dump($bi->next());
25var_dump($bi->setText('foo bar'));
26var_dump($bi->current());
27?>
28--EXPECT--
29bool(true)
30string(7) "foo bar"
31bool(true)
32string(1) "1"
33bool(true)
34string(3) "aaa"
35int(3)
36bool(true)
37int(0)
38