1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Jobles\Tests\Careerjet; |
4
|
|
|
|
5
|
|
|
use Jobles\Careerjet\Locale; |
6
|
|
|
|
7
|
|
|
class LocaleTest extends \PHPUnit_Framework_TestCase |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* @dataProvider localeDataProvider |
11
|
|
|
* @param $country |
12
|
|
|
* @param $language |
13
|
|
|
* @param $locale |
14
|
|
|
*/ |
15
|
|
|
public function testLocales($country, $language, $locale) |
16
|
|
|
{ |
17
|
|
|
$this->assertEquals($locale, Locale::byCountryAndLanguage($country, $language)); |
18
|
|
|
} |
19
|
|
|
|
20
|
|
|
public function localeDataProvider() |
21
|
|
|
{ |
22
|
|
|
return [ |
23
|
|
|
['Australia', null, 'en_AU'], |
24
|
|
|
['Austria', null, 'de_AT'], |
25
|
|
|
['Argentina', null, 'es_AR'], |
26
|
|
|
['Belgium', 'French', 'fr_BE'], |
27
|
|
|
['Belgium', 'Dutch', 'nl_BE'], |
28
|
|
|
['Bolivia', null, 'es_BO'], |
29
|
|
|
['Brazil', null, 'pt_BR'], |
30
|
|
|
['Canada', 'French', 'fr_CA'], |
31
|
|
|
['Canada', 'English', 'en_CA'], |
32
|
|
|
['Chile', null, 'es_CL'], |
33
|
|
|
['China', 'English', 'en_CN'], |
34
|
|
|
['China', 'Chinese', 'zh_CN'], |
35
|
|
|
['Costa Rica', null, 'es_CR'], |
36
|
|
|
['Czech Republic', null, 'cs_CZ'], |
37
|
|
|
['Denmark', null, 'da_DK'], |
38
|
|
|
['Dominican Republic', null, 'es_DO'], |
39
|
|
|
['Ecuador', null, 'es_EC'], |
40
|
|
|
['Finland', null, 'fi_FI'], |
41
|
|
|
['France', null, 'fr_FR'], |
42
|
|
|
['Germany', null, 'de_DE'], |
43
|
|
|
['Guatemala', null, 'es_GT'], |
44
|
|
|
['Hungary', null, 'hu_HU'], |
45
|
|
|
['Hong Kong', null, 'en_HK'], |
46
|
|
|
['Italy', null, 'it_IT'], |
47
|
|
|
['Ireland', null, 'en_IE'], |
48
|
|
|
['India', null, 'en_IN'], |
49
|
|
|
['Japan', null, 'ja_JP'], |
50
|
|
|
['Korea', null, 'ko_KR'], |
51
|
|
|
['Luxembourg', null, 'fr_LU'], |
52
|
|
|
['Malaysia', null, 'en_MY'], |
53
|
|
|
['Mexico', null, 'es_MX'], |
54
|
|
|
['Morocco', null, 'fr_MA'], |
55
|
|
|
['Netherlands', null, 'nl_NL'], |
56
|
|
|
['New Zealand', null, 'en_NZ'], |
57
|
|
|
['Norway', null, 'no_NO'], |
58
|
|
|
['Oman', null, 'en_OM'], |
59
|
|
|
['Pakistan', null, 'en_PK'], |
60
|
|
|
['Panama', null, 'es_PA'], |
61
|
|
|
['Paraguay', null, 'es_PY'], |
62
|
|
|
['Philippines', null, 'en_PH'], |
63
|
|
|
['Peru', null, 'es_PE'], |
64
|
|
|
['Poland', null, 'pl_PL'], |
65
|
|
|
['Portugal', null, 'pt_PT'], |
66
|
|
|
['Puerto Rico', null, 'es_PR'], |
67
|
|
|
['Qatar', null, 'en_QA'], |
68
|
|
|
['Russia', null, 'ru_RU'], |
69
|
|
|
['Singapore', null, 'en_SG'], |
70
|
|
|
['Slovakia', null, 'sk_SK'], |
71
|
|
|
['South Africa', null, 'en_ZA'], |
72
|
|
|
['Spain', null, 'es_ES'], |
73
|
|
|
['Sweden', null, 'sv_SE'], |
74
|
|
|
['Switzerland', 'German', 'de_CH'], |
75
|
|
|
['Switzerland', 'French', 'fr_CH'], |
76
|
|
|
['Taiwan', null, 'en_TW'], |
77
|
|
|
['Turkey', null, 'tr_TR'], |
78
|
|
|
['Ukraine', 'Russian', 'ru_UA'], |
79
|
|
|
['Ukraine', 'Ukrainian', 'uk_UA'], |
80
|
|
|
['United Arab Emirates', null, 'en_AE'], |
81
|
|
|
['United Kingdom', null, 'en_GB'], |
82
|
|
|
['United States', null, 'en_US'], |
83
|
|
|
['Uruguay', null, 'es_UY'], |
84
|
|
|
['Venezuela', null, 'es_VE'], |
85
|
|
|
['Vietnam', 'English', 'en_VN'], |
86
|
|
|
['Vietnam', 'Vietnamese', 'vi_VN'], |
87
|
|
|
]; |
88
|
|
|
} |
89
|
|
|
} |
90
|
|
|
|