MediaWiki
REL1_30
LanguageZhTest.php
Go to the documentation of this file.
1
<?php
2
3
class
LanguageZhTest
extends
LanguageClassesTestCase
{
8
public
function
testAutoConvertToAllVariants
( $result,
$value
) {
9
$this->assertEquals( $result, $this->
getLang
()->autoConvertToAllVariants(
$value
) );
10
}
11
12
public
static
function
provideAutoConvertToAllVariants
() {
13
return
[
14
// Plain hant -> hans
15
[
16
[
17
'zh'
=>
'㑯'
,
18
'zh-hans'
=>
'㑔'
,
19
'zh-hant'
=>
'㑯'
,
20
'zh-cn'
=>
'㑔'
,
21
'zh-hk'
=>
'㑯'
,
22
'zh-mo'
=>
'㑯'
,
23
'zh-my'
=>
'㑔'
,
24
'zh-sg'
=>
'㑔'
,
25
'zh-tw'
=>
'㑯'
,
26
],
27
'㑯'
28
],
29
// Plain hans -> hant
30
[
31
[
32
'zh'
=>
'㐷'
,
33
'zh-hans'
=>
'㐷'
,
34
'zh-hant'
=>
'傌'
,
35
'zh-cn'
=>
'㐷'
,
36
'zh-hk'
=>
'傌'
,
37
'zh-mo'
=>
'傌'
,
38
'zh-my'
=>
'㐷'
,
39
'zh-sg'
=>
'㐷'
,
40
'zh-tw'
=>
'傌'
,
41
],
42
'㐷'
43
],
44
// zh-cn specific
45
[
46
[
47
'zh'
=>
'仲介'
,
48
'zh-hans'
=>
'仲介'
,
49
'zh-hant'
=>
'仲介'
,
50
'zh-cn'
=>
'中介'
,
51
'zh-hk'
=>
'仲介'
,
52
'zh-mo'
=>
'仲介'
,
53
'zh-my'
=>
'中介'
,
54
'zh-sg'
=>
'中介'
,
55
'zh-tw'
=>
'仲介'
,
56
],
57
'仲介'
58
],
59
// zh-hk specific
60
[
61
[
62
'zh'
=>
'中文里'
,
63
'zh-hans'
=>
'中文里'
,
64
'zh-hant'
=>
'中文裡'
,
65
'zh-cn'
=>
'中文里'
,
66
'zh-hk'
=>
'中文裏'
,
67
'zh-mo'
=>
'中文裏'
,
68
'zh-my'
=>
'中文里'
,
69
'zh-sg'
=>
'中文里'
,
70
'zh-tw'
=>
'中文裡'
,
71
],
72
'中文里'
73
],
74
// zh-tw specific
75
[
76
[
77
'zh'
=>
'甲肝'
,
78
'zh-hans'
=>
'甲肝'
,
79
'zh-hant'
=>
'甲肝'
,
80
'zh-cn'
=>
'甲肝'
,
81
'zh-hk'
=>
'甲肝'
,
82
'zh-mo'
=>
'甲肝'
,
83
'zh-my'
=>
'甲肝'
,
84
'zh-sg'
=>
'甲肝'
,
85
'zh-tw'
=>
'A肝'
,
86
],
87
'甲肝'
88
],
89
// zh-tw overrides zh-hant
90
[
91
[
92
'zh'
=>
'账'
,
93
'zh-hans'
=>
'账'
,
94
'zh-hant'
=>
'賬'
,
95
'zh-cn'
=>
'账'
,
96
'zh-hk'
=>
'賬'
,
97
'zh-mo'
=>
'賬'
,
98
'zh-my'
=>
'账'
,
99
'zh-sg'
=>
'账'
,
100
'zh-tw'
=>
'帳'
,
101
],
102
'账'
103
],
104
// zh-hk overrides zh-hant
105
[
106
[
107
'zh'
=>
'一地里'
,
108
'zh-hans'
=>
'一地里'
,
109
'zh-hant'
=>
'一地裡'
,
110
'zh-cn'
=>
'一地里'
,
111
'zh-hk'
=>
'一地裏'
,
112
'zh-mo'
=>
'一地裏'
,
113
'zh-my'
=>
'一地里'
,
114
'zh-sg'
=>
'一地里'
,
115
'zh-tw'
=>
'一地裡'
,
116
],
117
'一地里'
118
],
119
];
120
}
121
}
LanguageClassesTestCase
Helping class to run tests using a clean language instance.
Definition
LanguageClassesTestCase.php:21
LanguageClassesTestCase\getLang
getLang()
Definition
LanguageClassesTestCase.php:41
LanguageZhTest
Definition
LanguageZhTest.php:3
LanguageZhTest\testAutoConvertToAllVariants
testAutoConvertToAllVariants( $result, $value)
provideAutoConvertToAllVariants Language::autoConvertToAllVariants
Definition
LanguageZhTest.php:8
LanguageZhTest\provideAutoConvertToAllVariants
static provideAutoConvertToAllVariants()
Definition
LanguageZhTest.php:12
$value
$value
Definition
styleTest.css.php:45
tests
phpunit
languages
classes
LanguageZhTest.php
Generated on Mon Nov 25 2024 15:44:04 for MediaWiki by
1.10.0