From 158aca848a0a3978e433733140c66006481db14f Mon Sep 17 00:00:00 2001
From: marcosptf <marcosptf@yahoo.com.br>
Date: Sun, 9 Aug 2015 07:23:07 -0300
Subject: [PATCH] new test refactor

---
 ext/enchant/tests/broker_dict_exists.phpt | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/ext/enchant/tests/broker_dict_exists.phpt b/ext/enchant/tests/broker_dict_exists.phpt
index 15ba5da6b2..5fe22dc3dd 100644
--- a/ext/enchant/tests/broker_dict_exists.phpt
+++ b/ext/enchant/tests/broker_dict_exists.phpt
@@ -3,18 +3,16 @@ enchant_broker_dict_exists() function
 --CREDITS--
 marcosptf - <marcosptf@yahoo.com.br>
 --SKIPIF--
-<?php 
+<?php
 if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
 ?>
 --FILE--
 <?php
-$lang="en_US";
 $broker = enchant_broker_init();
-if (!is_resource($broker)) {
-    exit("init failed\n");
-}
+$dicts = enchant_broker_list_dicts($broker);
 
-if (enchant_broker_dict_exists($broker,$lang)) {
+if (enchant_broker_dict_exists($broker, $dicts[0]['lang_tag'])) {
     echo("OK\n");
 } else {
     echo("dicts dont exist failed\n");
-- 
2.40.0