1--TEST--
2enchant_broker_request_dict() function
3--SKIPIF--
4<?php
5if(!extension_loaded('enchant')) die('skip, enchant not loader');
6?>
7--FILE--
8<?php
9$broker = enchant_broker_init();
10if (!is_resource($broker)) {
11	exit("init failed\n");
12}
13
14$dicts = enchant_broker_list_dicts($broker);
15if (is_array($dicts)) {
16	if (count($dicts)) {
17		$dict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
18		if (is_resource($dict)) {
19			echo "OK\n";
20		} else {
21			echo "fail to request " . $dicts[0]['lang_tag'];
22		}
23	}
24} else {
25	exit("list dicts failed\n");
26}
27echo "OK\n";
28?>
29--EXPECT--
30OK
31OK
32