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