summaryrefslogtreecommitdiff
path: root/ext/enchant/tests/broker_list_dicts.phpt
blob: 6d155516c0caffb344efc853450fe612ec13ee78 (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
40
41
42
43
44
45
--TEST--
enchant_broker_list_dicts() function
--CREDITS--
marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
<?php
if (!extension_loaded('enchant')) {
	echo "skip: Enchant extension not enabled\n";
	exit;
}

$broker = enchant_broker_init();

if (!$broker) {
	echo "skip: Unable to init broker\n";
	exit;
}

if (!enchant_broker_list_dicts($broker)) {
	enchant_broker_free($broker);

	echo "skip: No broker dicts installed\n";
}

enchant_broker_free($broker);
?>
--FILE--
<?php
$broker = enchant_broker_init();
if (is_resource($broker)) {
    echo("OK\n");
    $brokerListDicts = enchant_broker_list_dicts($broker);

    if (is_array($brokerListDicts)) {
        echo("OK\n");
    } else {
        echo("broker list dicts failed\n");
    }
} else {
    echo("init failed\n");
}
?>
--EXPECT--
OK
OK