1--TEST--
2enchant_broker_request_dict() function
3--CREDITS--
4marcosptf - <marcosptf@yahoo.com.br>
5--EXTENSIONS--
6enchant
7--SKIPIF--
8<?php
9if (!is_object(enchant_broker_init())) {die("skip, resource dont load\n");}
10if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, no dictionary installed on this machine! \n");}
11?>
12--FILE--
13<?php
14$broker = enchant_broker_init();
15$dicts = enchant_broker_list_dicts($broker);
16
17if (is_array($dicts)) {
18        $dict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
19        if (is_object($dict)) {
20            echo("OK\n");
21        } else {
22            echo("fail to request " . $dicts[0]['lang_tag']);
23        }
24} else {
25    echo("list dicts failed\n");
26}
27echo("OK\n");
28?>
29--EXPECT--
30OK
31OK
32