diff options
Diffstat (limited to 'ext/enchant/tests')
22 files changed, 82 insertions, 82 deletions
diff --git a/ext/enchant/tests/broker_describe.phpt b/ext/enchant/tests/broker_describe.phpt index 721d618df3..a25a77bd8e 100644 --- a/ext/enchant/tests/broker_describe.phpt +++ b/ext/enchant/tests/broker_describe.phpt @@ -31,22 +31,22 @@ $counter = 0; if($broker) { echo("OK\n"); - $provider = enchant_broker_describe($broker); - + $provider = enchant_broker_describe($broker); + if (is_array($provider)) { echo("OK\n"); - + if ((isset($provider[$counter]['name']) && isset($provider[$counter]['desc']) && isset($provider[$counter]['file']))) { echo("OK\n"); - - } else { + + } else { echo("failed, broker describe\n"); - + } } else { echo "failed, brocker describe array \n"; } - + enchant_broker_free($broker); } else { diff --git a/ext/enchant/tests/broker_free.phpt b/ext/enchant/tests/broker_free.phpt index dd9149468d..6964895962 100644 --- a/ext/enchant/tests/broker_free.phpt +++ b/ext/enchant/tests/broker_free.phpt @@ -13,7 +13,7 @@ $broker = enchant_broker_init(); if (is_resource($broker)) { echo "OK\n"; enchant_broker_free($broker); - + } else { exit("init failed\n"); } diff --git a/ext/enchant/tests/broker_free_01.phpt b/ext/enchant/tests/broker_free_01.phpt index 3de4c4b7e3..77391cdd60 100644 --- a/ext/enchant/tests/broker_free_01.phpt +++ b/ext/enchant/tests/broker_free_01.phpt @@ -12,7 +12,7 @@ if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");} $broker = enchant_broker_init(); if (is_resource($broker)) { echo("OK\n"); - + if (enchant_broker_free($broker)) { echo("OK\n"); } else { diff --git a/ext/enchant/tests/broker_free_02.phpt b/ext/enchant/tests/broker_free_02.phpt index a777d889ae..75ce5cb8ac 100644 --- a/ext/enchant/tests/broker_free_02.phpt +++ b/ext/enchant/tests/broker_free_02.phpt @@ -16,23 +16,23 @@ $newWord = array("iLoveJava","iLoveJavascript","iLoveRuby","iLovePerl","iLoveAwk if (is_resource($broker)) { echo("OK\n"); - $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); + if ($requestDict) { echo("OK\n"); for($x=0;$x<count($newWord);$x++) { $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord[$x]); } - + if (NULL === $AddtoPersonalDict) { var_dump($AddtoPersonalDict); - + if (enchant_broker_free_dict($requestDict)) { echo("OK\n"); - + if (enchant_broker_free($broker)) { echo("OK\n"); - + } else { echo("broker free failed\n"); } @@ -43,8 +43,8 @@ if (is_resource($broker)) { echo("dict add to personal failed\n"); } } else { - echo("broker request dict failed\n"); - } + echo("broker request dict failed\n"); + } } else { echo("init failed\n"); } diff --git a/ext/enchant/tests/broker_free_dict.phpt b/ext/enchant/tests/broker_free_dict.phpt index f0b6bb6dc3..0e18ae7cc6 100644 --- a/ext/enchant/tests/broker_free_dict.phpt +++ b/ext/enchant/tests/broker_free_dict.phpt @@ -3,7 +3,7 @@ enchant_broker_free_dict(resource $dict); 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");} if(!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");} @@ -16,29 +16,29 @@ $newWord = "iLoveJava"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { echo("OK\n"); - $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict, $newWord); - + $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict, $newWord); + if (NULL === $AddtoPersonalDict) { - var_dump($AddtoPersonalDict); - + var_dump($AddtoPersonalDict); + if (enchant_broker_free_dict($requestDict)) { echo("OK\n"); - + } else { echo("dict broker free has failed\n"); } - + } else { echo("dict add to personal failed\n"); } - + } else { - echo("broker request dict failed\n"); + echo("broker request dict failed\n"); } - + } else { echo("broker is not a resource; failed;\n"); } diff --git a/ext/enchant/tests/broker_get_error.phpt b/ext/enchant/tests/broker_get_error.phpt index e8d248eca6..93f6130c24 100644 --- a/ext/enchant/tests/broker_get_error.phpt +++ b/ext/enchant/tests/broker_get_error.phpt @@ -13,7 +13,7 @@ $broker = enchant_broker_init(); if (is_resource($broker)) { echo("OK\n"); $enchantErr = enchant_broker_get_error($broker); - + if ("" == $enchantErr) { echo("OK\n"); } else { diff --git a/ext/enchant/tests/broker_init.phpt b/ext/enchant/tests/broker_init.phpt index 12c25e3ddc..b13541c070 100644 --- a/ext/enchant/tests/broker_init.phpt +++ b/ext/enchant/tests/broker_init.phpt @@ -3,7 +3,7 @@ enchant_broker_init() 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");} ?> @@ -12,7 +12,7 @@ if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");} $broker = enchant_broker_init(); if (is_resource($broker)) { echo("OK\n"); -} else { +} else { echo("failure, its not a resource\n"); } ?> diff --git a/ext/enchant/tests/broker_list_dicts.phpt b/ext/enchant/tests/broker_list_dicts.phpt index 3b29a5d5e5..6d155516c0 100644 --- a/ext/enchant/tests/broker_list_dicts.phpt +++ b/ext/enchant/tests/broker_list_dicts.phpt @@ -30,7 +30,7 @@ $broker = enchant_broker_init(); if (is_resource($broker)) { echo("OK\n"); $brokerListDicts = enchant_broker_list_dicts($broker); - + if (is_array($brokerListDicts)) { echo("OK\n"); } else { diff --git a/ext/enchant/tests/broker_request_dict.phpt b/ext/enchant/tests/broker_request_dict.phpt index 5b7abe76bf..3cf952f869 100644 --- a/ext/enchant/tests/broker_request_dict.phpt +++ b/ext/enchant/tests/broker_request_dict.phpt @@ -16,7 +16,7 @@ $dicts = enchant_broker_list_dicts($broker); if (is_array($dicts)) { if (count($dicts)) { $dict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if (is_resource($dict)) { echo "OK\n"; } else { diff --git a/ext/enchant/tests/broker_request_dict_01.phpt b/ext/enchant/tests/broker_request_dict_01.phpt index 518b16de44..49deeaaf30 100644 --- a/ext/enchant/tests/broker_request_dict_01.phpt +++ b/ext/enchant/tests/broker_request_dict_01.phpt @@ -3,7 +3,7 @@ enchant_broker_request_dict() 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");} if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");} diff --git a/ext/enchant/tests/broker_request_pwl_dict.phpt b/ext/enchant/tests/broker_request_pwl_dict.phpt index 6235aeea5f..a8beadba6c 100644 --- a/ext/enchant/tests/broker_request_pwl_dict.phpt +++ b/ext/enchant/tests/broker_request_pwl_dict.phpt @@ -3,7 +3,7 @@ resource enchant_broker_request_pwl_dict(resource $broker, string $filename); fu --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");} ?> @@ -15,11 +15,11 @@ $pathPwlDict = __DIR__ . "/enchant_broker_request_pwl_dict.pwl"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_pwl_dict($broker, $pathPwlDict); - + if (is_resource($requestDict)) { echo("OK\n"); $dictdescribe = enchant_dict_describe($requestDict); - + if ($pathPwlDict === $dictdescribe['file']) { echo("OK\n"); } else { diff --git a/ext/enchant/tests/bug13181.phpt b/ext/enchant/tests/bug13181.phpt index 79b28333d2..742e0c79fe 100644 --- a/ext/enchant/tests/bug13181.phpt +++ b/ext/enchant/tests/bug13181.phpt @@ -1,7 +1,7 @@ --TEST-- bug #13181, leaving a context frees the broker resources --SKIPIF-- -<?php +<?php if (!extension_loaded('enchant')) { echo "skip: Enchant extension not enabled\n"; exit; diff --git a/ext/enchant/tests/dict_add_to_personal.phpt b/ext/enchant/tests/dict_add_to_personal.phpt index 96bac1e256..e711a25f45 100644 --- a/ext/enchant/tests/dict_add_to_personal.phpt +++ b/ext/enchant/tests/dict_add_to_personal.phpt @@ -3,7 +3,7 @@ enchant_dict_add_to_personal() 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");} if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");} @@ -17,21 +17,21 @@ $newWord = "iLoveJava"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { echo("OK\n"); - $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord); - + $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord); + if (NULL === $AddtoPersonalDict) { - var_dump($AddtoPersonalDict); - + var_dump($AddtoPersonalDict); + } else { echo("dict add to personal failed\n"); } - + } else { - echo("broker request dict failed\n"); - + echo("broker request dict failed\n"); + } } else { diff --git a/ext/enchant/tests/dict_add_to_session.phpt b/ext/enchant/tests/dict_add_to_session.phpt index 78f66f8447..441d2dde74 100644 --- a/ext/enchant/tests/dict_add_to_session.phpt +++ b/ext/enchant/tests/dict_add_to_session.phpt @@ -17,24 +17,24 @@ $newWord = "iLoveJavaScript"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { echo("OK\n"); $AddtoSessionDict = enchant_dict_add_to_session($requestDict,$newWord); - + if (NULL === $AddtoSessionDict) { var_dump($AddtoSessionDict); } else { echo("dict add to session failed\n"); - + } - + } else { echo("broker request dict failed\n"); } } else { echo("broker is not a resource; failed;\n"); - + } echo "OK\n"; ?> diff --git a/ext/enchant/tests/dict_check.phpt b/ext/enchant/tests/dict_check.phpt index fd5cf45b34..eb4198c4cf 100644 --- a/ext/enchant/tests/dict_check.phpt +++ b/ext/enchant/tests/dict_check.phpt @@ -3,7 +3,7 @@ enchant_dict_check() 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");} if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");} @@ -17,21 +17,21 @@ $newWord = "java"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { echo("OK\n"); enchant_dict_add_to_personal($requestDict, $newWord); - + if (enchant_dict_check($requestDict, $newWord)) { echo("OK\n"); - + } else { echo("dict check new word failed\n"); } - + } else { - echo("broker request dict failed\n"); - + echo("broker request dict failed\n"); + } } else { diff --git a/ext/enchant/tests/dict_describe.phpt b/ext/enchant/tests/dict_describe.phpt index 60a1e7c3f3..18cdbfe379 100644 --- a/ext/enchant/tests/dict_describe.phpt +++ b/ext/enchant/tests/dict_describe.phpt @@ -16,14 +16,14 @@ $dicts = enchant_broker_list_dicts($broker); if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { echo("OK\n"); $dictDescribe = enchant_dict_describe($requestDict); - + if (is_array($dictDescribe)) { echo("OK\n"); - + } else { echo("broker request dict failed\n"); } diff --git a/ext/enchant/tests/dict_get_error.phpt b/ext/enchant/tests/dict_get_error.phpt index fc942a55ef..271214a786 100644 --- a/ext/enchant/tests/dict_get_error.phpt +++ b/ext/enchant/tests/dict_get_error.phpt @@ -16,7 +16,7 @@ $dicts = enchant_broker_list_dicts($broker); if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { var_dump(enchant_dict_get_error($requestDict)); } else { diff --git a/ext/enchant/tests/dict_is_in_session.phpt b/ext/enchant/tests/dict_is_in_session.phpt index 6bf4af4839..4e670d5512 100644 --- a/ext/enchant/tests/dict_is_in_session.phpt +++ b/ext/enchant/tests/dict_is_in_session.phpt @@ -17,11 +17,11 @@ $newWord = "aspell"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { echo("OK\n"); $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord); - + if (NULL === $AddtoPersonalDict) { var_dump(enchant_dict_is_in_session($requestDict,$newWord)); } else { diff --git a/ext/enchant/tests/dict_quick_check_01.phpt b/ext/enchant/tests/dict_quick_check_01.phpt index 4ef46829c3..a4dd818111 100644 --- a/ext/enchant/tests/dict_quick_check_01.phpt +++ b/ext/enchant/tests/dict_quick_check_01.phpt @@ -17,10 +17,10 @@ $word = "aspell"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { enchant_dict_quick_check($requestDict,$word,$sugs); - + if (is_array($sugs)) { echo("OK\n"); } else { diff --git a/ext/enchant/tests/dict_store_replacement.phpt b/ext/enchant/tests/dict_store_replacement.phpt index 3383e77fe1..8ecd7b06a0 100644 --- a/ext/enchant/tests/dict_store_replacement.phpt +++ b/ext/enchant/tests/dict_store_replacement.phpt @@ -18,11 +18,11 @@ $rightWord = "java"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { echo("OK\n"); $AddtoPersonalDict = enchant_dict_store_replacement($requestDict,$wrongWord,$rightWord); - + if (NULL === $AddtoPersonalDict) { var_dump($AddtoPersonalDict); } else { diff --git a/ext/enchant/tests/dict_suggest.phpt b/ext/enchant/tests/dict_suggest.phpt index 7317120a3b..85aa823579 100644 --- a/ext/enchant/tests/dict_suggest.phpt +++ b/ext/enchant/tests/dict_suggest.phpt @@ -3,7 +3,7 @@ enchant_dict_suggest() 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");} if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");} @@ -17,20 +17,20 @@ $sugs = "soong"; if (is_resource($broker)) { echo("OK\n"); $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']); - + if ($requestDict) { echo("OK\n"); - $dictSuggest = enchant_dict_suggest($requestDict,$sugs); + $dictSuggest = enchant_dict_suggest($requestDict,$sugs); if (is_array($dictSuggest)) { echo("OK\n"); } else { echo("dict suggest failed\n"); } - + } else { - echo("broker request dict failed\n"); - + echo("broker request dict failed\n"); + } } else { diff --git a/ext/enchant/tests/enchant_broker_set_dict_path.phpt b/ext/enchant/tests/enchant_broker_set_dict_path.phpt index 47a65093bc..3911a7fe4c 100644 --- a/ext/enchant/tests/enchant_broker_set_dict_path.phpt +++ b/ext/enchant/tests/enchant_broker_set_dict_path.phpt @@ -19,23 +19,23 @@ $dictTypeValue2 = 2; if (is_resource($broker)) { echo("OK\n"); - + if (enchant_broker_set_dict_path($broker, $dictTypeValue1, $backEndDictType1)) { echo("OK\n"); - + if (enchant_broker_set_dict_path($broker, $dictTypeValue2, $backEndDictType2)) { echo("OK\n"); - - if ( + + if ( (enchant_broker_get_dict_path($broker,$dictTypeValue1) == $backEndDictType1) && - (enchant_broker_get_dict_path($broker,$dictTypeValue2) == $backEndDictType2) + (enchant_broker_get_dict_path($broker,$dictTypeValue2) == $backEndDictType2) ) { echo("OK\n"); } else { echo("broker get dict path has failed \n"); - } - + } + } else { echo("broker set dict path {$backEndDictType2} has failed \n"); } |