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