1--TEST--
2enchant_broker_describe() function
3--CREDITS--
4marcosptf - <marcosptf@yahoo.com.br>
5--SKIPIF--
6<?php
7if (!extension_loaded('enchant')) {
8    echo "skip: Enchant extension not enabled\n";
9    exit;
10}
11
12$broker = enchant_broker_init();
13
14if (!$broker) {
15    echo "skip: Unable to init broker\n";
16    exit;
17}
18
19if (!enchant_broker_describe($broker)) {
20    @enchant_broker_free($broker);
21
22    echo "skip: No broker providers found\n";
23}
24
25@enchant_broker_free($broker);
26?>
27--FILE--
28<?php
29$broker = enchant_broker_init();
30$counter = 0;
31
32if($broker) {
33    echo("OK\n");
34    $provider = enchant_broker_describe($broker);
35
36    if (is_array($provider)) {
37        echo("OK\n");
38
39    if ((isset($provider[$counter]['name']) && isset($provider[$counter]['desc']) && isset($provider[$counter]['file']))) {
40       echo("OK\n");
41
42    } else {
43       echo("failed, broker describe\n");
44
45    }
46    } else {
47        echo "failed, brocker describe array \n";
48    }
49
50    @enchant_broker_free($broker);
51
52} else {
53    echo("failed, broker_init failure\n");
54}
55?>
56--EXPECT--
57OK
58OK
59OK
60