Fixed: Not selecting a datalabel used to issue a notice(undefined offset)
[phpmyadmin/ammaryasirr.git] / test / libraries / select_lang / PMA_langDetails_test.php
blobca758edf7dbdfb216afd476905f67f0ddb144bae
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Test for PMA_langDetails from select_lang.lib.php
6 * @package phpMyAdmin-test
7 * @version $Id: PMA_langDetails_test.php
8 * @group select_lang.lib-tests
9 */
12 * Include to test.
14 require_once 'libraries/select_lang.lib.php';
16 class PMA_langDetails_test extends PHPUnit_Framework_TestCase
18 function dataProvider()
20 return array(
21 array('af|afrikaans', 'af', '', 'af'),
22 array('ar|arabic', 'ar', '&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;', 'ar'),
23 array('az|azerbaijani', 'az', 'Az&#601;rbaycanca', 'az'),
24 array('bn|bangla', 'bn', 'বাংলা', 'bn'),
25 array('be|belarusian', 'be', '&#1041;&#1077;&#1083;&#1072;&#1088;&#1091;&#1089;&#1082;&#1072;&#1103;', 'be'),
26 array('be[-_]lat|belarusian latin', 'be-lat', 'Bie&#0322;aruskaja', 'be@latin'),
27 array('bg|bulgarian', 'bg', '&#1041;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;', 'bg'),
28 array('bs|bosnian', 'bs', 'Bosanski', 'bs'),
29 array('br|breton', 'br', 'Brezhoneg', 'br'),
30 array('ca|catalan', 'ca', 'Catal&agrave;', 'ca'),
31 array('cs|czech', 'cs', 'Čeština', 'cs'),
32 array('cy|welsh', 'cy', 'Cymraeg', 'cy'),
33 array('da|danish', 'da', 'Dansk', 'da'),
34 array('de|german', 'de', 'Deutsch', 'de'),
35 array('el|greek', 'el', '&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;&#940;', 'el'),
36 array('en|english', 'en', '', 'en'),
37 array('en[_-]gb|english (United Kingdom)', 'en-gb', '', 'en_GB'),
38 array('es|spanish', 'es', 'Espa&ntilde;ol', 'es'),
39 array('et|estonian', 'et', 'Eesti', 'et'),
40 array('eu|basque', 'eu', 'Euskara', 'eu',),
41 array('fa|persian', 'fa', '&#1601;&#1575;&#1585;&#1587;&#1740;', 'fa'),
42 array('fi|finnish', 'fi', 'Suomi', 'fi'),
43 array('fr|french', 'fr', 'Fran&ccedil;ais', 'fr'),
44 array('gl|galician', 'gl', 'Galego', 'gl'),
45 array('he|hebrew', 'he', '&#1506;&#1489;&#1512;&#1497;&#1514;', 'he'),
46 array('hi|hindi', 'hi', '&#2361;&#2367;&#2344;&#2381;&#2342;&#2368;', 'hi'),
47 array('hr|croatian', 'hr', 'Hrvatski', 'hr'),
48 array('hu|hungarian', 'hu', 'Magyar', 'hu'),
49 array('id|indonesian', 'id', 'Bahasa Indonesia', 'id'),
50 array('it|italian', 'it', 'Italiano', 'it'),
51 array('ja|japanese', 'ja', '&#26085;&#26412;&#35486;', 'ja'),
52 array('ko|korean', 'ko', '&#54620;&#44397;&#50612;', 'ko'),
53 array('ka|georgian', 'ka', '&#4325;&#4304;&#4320;&#4311;&#4323;&#4314;&#4312;', 'ka'),
54 array('lt|lithuanian', 'lt', 'Lietuvi&#371;', 'lt'),
55 array('lv|latvian', 'lv', 'Latvie&scaron;u', 'lv'),
56 array('mk|macedonian', 'mk', 'Macedonian', 'mk'),
57 array('mn|mongolian', 'mn', '&#1052;&#1086;&#1085;&#1075;&#1086;&#1083;', 'mn'),
58 array('ms|malay', 'ms', 'Bahasa Melayu', 'ms'),
59 array('nl|dutch', 'nl', 'Nederlands', 'nl'),
60 array('nb|norwegian', 'nb', 'Norsk', 'nb'),
61 array('pl|polish', 'pl', 'Polski', 'pl'),
62 array('pt[-_]br|brazilian portuguese', 'pt-BR', 'Portugu&ecirc;s', 'pt_BR'),
63 array('pt|portuguese', 'pt', 'Portugu&ecirc;s', 'pt'),
64 array('ro|romanian', 'ro', 'Rom&acirc;n&#259;', 'ro'),
65 array('ru|russian', 'ru', '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;', 'ru'),
66 array('si|sinhala', 'si', '&#3523;&#3538;&#3458;&#3524;&#3517;', 'si'),
67 array('sk|slovak', 'sk', 'Sloven&#269;ina', 'sk'),
68 array('sl|slovenian', 'sl', 'Sloven&scaron;&#269;ina', 'sl'),
69 array('sq|albanian', 'sq', 'Shqip', 'sq'),
70 array('sr[-_]lat|serbian latin', 'sr-lat', 'Srpski', 'sr@latin'),
71 array('sr|serbian', 'sr', '&#1057;&#1088;&#1087;&#1089;&#1082;&#1080;', 'sr'),
72 array('sv|swedish', 'sv', 'Svenska', 'sv'),
73 array('ta|tamil', 'ta', 'தமிழ்', 'ta'),
74 array('te|telugu', 'te', 'తెలుగు', 'te'),
75 array('th|thai', 'th', '&#3616;&#3634;&#3625;&#3634;&#3652;&#3607;&#3618;', 'th'),
76 array('tr|turkish', 'tr', 'T&uuml;rk&ccedil;e', 'tr'),
77 array('tt|tatarish', 'tt', 'Tatar&ccedil;a', 'tt'),
78 array('ug|uyghur', 'ug', 'ئۇيغۇرچە', 'ug'),
79 array('uk|ukrainian', 'uk', '&#1059;&#1082;&#1088;&#1072;&#1111;&#1085;&#1089;&#1100;&#1082;&#1072;', 'uk'),
80 array('ur|urdu', 'ur', 'اُردوُ', 'ur'),
81 array('uz[-_]lat|uzbek-latin', 'uz-lat', 'O&lsquo;zbekcha', 'uz@latin'),
82 array('uz[-_]cyr|uzbek-cyrillic', 'uz-cyr', '&#1038;&#1079;&#1073;&#1077;&#1082;&#1095;&#1072;', 'uz'),
83 array('zh[-_](tw|hk)|chinese traditional', 'zh-TW', '&#20013;&#25991;', 'zh_TW'),
84 array('zh|chinese simplified', 'zh', '&#20013;&#25991;', 'zh_CN'),
85 array('test_lang|test_lang', 'test_lang', 'test_lang', 'test_lang')
89 /**
90 * @dataProvider dataProvider
92 function testLangDetails($a, $b, $c,$d)
94 $this->assertEquals(array($a, $b, $c), PMA_langDetails($d));