diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
commit | 4f5b44bd3bd490309eb2ba7b44df4769816ba729 (patch) | |
tree | 6cefe170dfe0a5a361cb1e2d1fc4d580a3316d02 /vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php | |
parent | 2b840e0cfb63a453bea67a98541f3df9c273c5f5 (diff) | |
download | wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.gz wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.zst wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.zip |
twig implementation
Diffstat (limited to 'vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php')
-rw-r--r-- | vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php b/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php new file mode 100644 index 00000000..7e957187 --- /dev/null +++ b/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php | |||
@@ -0,0 +1,159 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Intl\Tests\Locale; | ||
13 | |||
14 | class LocaleTest extends AbstractLocaleTest | ||
15 | { | ||
16 | /** | ||
17 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
18 | */ | ||
19 | public function testAcceptFromHttp() | ||
20 | { | ||
21 | $this->call('acceptFromHttp', 'pt-br,en-us;q=0.7,en;q=0.5'); | ||
22 | } | ||
23 | |||
24 | /** | ||
25 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
26 | */ | ||
27 | public function testComposeLocale() | ||
28 | { | ||
29 | $subtags = array( | ||
30 | 'language' => 'pt', | ||
31 | 'script' => 'Latn', | ||
32 | 'region' => 'BR' | ||
33 | ); | ||
34 | $this->call('composeLocale', $subtags); | ||
35 | } | ||
36 | |||
37 | /** | ||
38 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
39 | */ | ||
40 | public function testFilterMatches() | ||
41 | { | ||
42 | $this->call('filterMatches', 'pt-BR', 'pt-BR'); | ||
43 | } | ||
44 | |||
45 | /** | ||
46 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
47 | */ | ||
48 | public function testGetAllVariants() | ||
49 | { | ||
50 | $this->call('getAllVariants', 'pt_BR_Latn'); | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
55 | */ | ||
56 | public function testGetDisplayLanguage() | ||
57 | { | ||
58 | $this->call('getDisplayLanguage', 'pt-Latn-BR', 'en'); | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
63 | */ | ||
64 | public function testGetDisplayName() | ||
65 | { | ||
66 | $this->call('getDisplayName', 'pt-Latn-BR', 'en'); | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
71 | */ | ||
72 | public function testGetDisplayRegion() | ||
73 | { | ||
74 | $this->call('getDisplayRegion', 'pt-Latn-BR', 'en'); | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
79 | */ | ||
80 | public function testGetDisplayScript() | ||
81 | { | ||
82 | $this->call('getDisplayScript', 'pt-Latn-BR', 'en'); | ||
83 | } | ||
84 | |||
85 | /** | ||
86 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
87 | */ | ||
88 | public function testGetDisplayVariant() | ||
89 | { | ||
90 | $this->call('getDisplayVariant', 'pt-Latn-BR', 'en'); | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
95 | */ | ||
96 | public function testGetKeywords() | ||
97 | { | ||
98 | $this->call('getKeywords', 'pt-BR@currency=BRL'); | ||
99 | } | ||
100 | |||
101 | /** | ||
102 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
103 | */ | ||
104 | public function testGetPrimaryLanguage() | ||
105 | { | ||
106 | $this->call('getPrimaryLanguage', 'pt-Latn-BR'); | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
111 | */ | ||
112 | public function testGetRegion() | ||
113 | { | ||
114 | $this->call('getRegion', 'pt-Latn-BR'); | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
119 | */ | ||
120 | public function testGetScript() | ||
121 | { | ||
122 | $this->call('getScript', 'pt-Latn-BR'); | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
127 | */ | ||
128 | public function testLookup() | ||
129 | { | ||
130 | $langtag = array( | ||
131 | 'pt-Latn-BR', | ||
132 | 'pt-BR' | ||
133 | ); | ||
134 | $this->call('lookup', $langtag, 'pt-BR-x-priv1'); | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
139 | */ | ||
140 | public function testParseLocale() | ||
141 | { | ||
142 | $this->call('parseLocale', 'pt-Latn-BR'); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException | ||
147 | */ | ||
148 | public function testSetDefault() | ||
149 | { | ||
150 | $this->call('setDefault', 'pt_BR'); | ||
151 | } | ||
152 | |||
153 | protected function call($methodName) | ||
154 | { | ||
155 | $args = array_slice(func_get_args(), 1); | ||
156 | |||
157 | return call_user_func_array(array('Symfony\Component\Intl\Locale\Locale', $methodName), $args); | ||
158 | } | ||
159 | } | ||