summaryrefslogtreecommitdiff
path: root/ext/intl/tests/breakiter_factories_basic.phpt
blob: 4d05792c0e9f6f145d703945ecbe97d629278afb (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--TEST--
IntlBreakIterator factories: basic tests
--SKIPIF--
<?php
if (!extension_loaded('intl'))
	die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "ja");

$m = array('createWordInstance', 'createLineInstance', 'createCharacterInstance',
	'createSentenceInstance', 'createTitleInstance');

$t = 'Frase 1... Frase 2';

foreach ($m as $method) {
	echo "===== $method =====\n";
	$o1 = IntlBreakIterator::$method('ja');
	$o2 = IntlBreakIterator::$method(NULL);
	$o3 = IntlBreakIterator::$method();
	var_dump($o1 == $o2 && $o2 == $o3);
	echo "\n";
}
--EXPECT--
===== createWordInstance =====
bool(true)

===== createLineInstance =====
bool(true)

===== createCharacterInstance =====
bool(true)

===== createSentenceInstance =====
bool(true)

===== createTitleInstance =====
bool(true)