aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale')
-rw-r--r--vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php29
-rw-r--r--vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php159
-rw-r--r--vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php38
3 files changed, 0 insertions, 226 deletions
diff --git a/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php b/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php
deleted file mode 100644
index 08569fad..00000000
--- a/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php
+++ /dev/null
@@ -1,29 +0,0 @@
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
12namespace Symfony\Component\Intl\Tests\Locale;
13
14/**
15 * Test case for Locale implementations.
16 *
17 * @author Bernhard Schussek <bschussek@gmail.com>
18 */
19abstract class AbstractLocaleTest extends \PHPUnit_Framework_TestCase
20{
21 public function testSetDefault()
22 {
23 $this->call('setDefault', 'en_GB');
24
25 $this->assertSame('en_GB', $this->call('getDefault'));
26 }
27
28 abstract protected function call($methodName);
29}
diff --git a/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php b/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php
deleted file mode 100644
index 7e957187..00000000
--- a/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/LocaleTest.php
+++ /dev/null
@@ -1,159 +0,0 @@
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
12namespace Symfony\Component\Intl\Tests\Locale;
13
14class 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}
diff --git a/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php b/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php
deleted file mode 100644
index 39d4f3cb..00000000
--- a/vendor/symfony/intl/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php
+++ /dev/null
@@ -1,38 +0,0 @@
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
12namespace Symfony\Component\Intl\Tests\Locale\Verification;
13
14use Symfony\Component\Intl\Tests\Locale\AbstractLocaleTest;
15use Symfony\Component\Intl\Util\IntlTestHelper;
16
17/**
18 * Verifies that {@link AbstractLocaleTest} matches the behavior of the
19 * {@link Locale} class with a specific version of ICU.
20 *
21 * @author Bernhard Schussek <bschussek@gmail.com>
22 */
23class LocaleTest extends AbstractLocaleTest
24{
25 protected function setUp()
26 {
27 IntlTestHelper::requireFullIntl($this);
28
29 parent::setUp();
30 }
31
32 protected function call($methodName)
33 {
34 $args = array_slice(func_get_args(), 1);
35
36 return call_user_func_array(array('Locale', $methodName), $args);
37 }
38}