2 /* vim: set expandtab sw=4 ts=4 sts=4: */
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
14 require_once 'libraries/select_lang.lib.php';
16 class PMA_langDetails_test
extends PHPUnit_Framework_TestCase
18 function dataProvider()
21 array('af|afrikaans', 'af', '', 'af'),
22 array('ar|arabic', 'ar', 'العربية', 'ar'),
23 array('az|azerbaijani', 'az', 'Azərbaycanca', 'az'),
24 array('bn|bangla', 'bn', 'বাংলা', 'bn'),
25 array('be|belarusian', 'be', 'Беларуская', 'be'),
26 array('be[-_]lat|belarusian latin', 'be-lat', 'Biełaruskaja', 'be@latin'),
27 array('bg|bulgarian', 'bg', 'Български', 'bg'),
28 array('bs|bosnian', 'bs', 'Bosanski', 'bs'),
29 array('br|breton', 'br', 'Brezhoneg', 'br'),
30 array('ca|catalan', 'ca', 'Català', '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', 'Ελληνικά', 'el'),
36 array('en|english', 'en', '', 'en'),
37 array('en[_-]gb|english (United Kingdom)', 'en-gb', '', 'en_GB'),
38 array('es|spanish', 'es', 'Español', 'es'),
39 array('et|estonian', 'et', 'Eesti', 'et'),
40 array('eu|basque', 'eu', 'Euskara', 'eu',),
41 array('fa|persian', 'fa', 'فارسی', 'fa'),
42 array('fi|finnish', 'fi', 'Suomi', 'fi'),
43 array('fr|french', 'fr', 'Français', 'fr'),
44 array('gl|galician', 'gl', 'Galego', 'gl'),
45 array('he|hebrew', 'he', 'עברית', 'he'),
46 array('hi|hindi', 'hi', 'हिन्दी', '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', '日本語', 'ja'),
52 array('ko|korean', 'ko', '한국어', 'ko'),
53 array('ka|georgian', 'ka', 'ქართული', 'ka'),
54 array('lt|lithuanian', 'lt', 'Lietuvių', 'lt'),
55 array('lv|latvian', 'lv', 'Latviešu', 'lv'),
56 array('mk|macedonian', 'mk', 'Macedonian', 'mk'),
57 array('mn|mongolian', 'mn', 'Монгол', '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ês', 'pt_BR'),
63 array('pt|portuguese', 'pt', 'Português', 'pt'),
64 array('ro|romanian', 'ro', 'Română', 'ro'),
65 array('ru|russian', 'ru', 'Русский', 'ru'),
66 array('si|sinhala', 'si', 'සිංහල', 'si'),
67 array('sk|slovak', 'sk', 'Slovenčina', 'sk'),
68 array('sl|slovenian', 'sl', 'Slovenšč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', 'Српски', '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', 'ภาษาไทย', 'th'),
76 array('tr|turkish', 'tr', 'Türkçe', 'tr'),
77 array('tt|tatarish', 'tt', 'Tatarça', 'tt'),
78 array('ug|uyghur', 'ug', 'ئۇيغۇرچە', 'ug'),
79 array('uk|ukrainian', 'uk', 'Українська', 'uk'),
80 array('ur|urdu', 'ur', 'اُردوُ', 'ur'),
81 array('uz[-_]lat|uzbek-latin', 'uz-lat', 'O‘zbekcha', 'uz@latin'),
82 array('uz[-_]cyr|uzbek-cyrillic', 'uz-cyr', 'Ўзбекча', 'uz'),
83 array('zh[-_](tw|hk)|chinese traditional', 'zh-TW', '中文', 'zh_TW'),
84 array('zh|chinese simplified', 'zh', '中文', 'zh_CN'),
85 array('test_lang|test_lang', 'test_lang', 'test_lang', 'test_lang')
90 * @dataProvider dataProvider
92 function testLangDetails($a, $b, $c,$d)
94 $this->assertEquals(array($a, $b, $c), PMA_langDetails($d));