@@ -20,10 +20,7 @@ protected function setUp()
2020 {
2121 parent ::setUp ();
2222
23- // Since we test against "de_AT", we need the full implementation
24- IntlTestHelper::requireFullIntl ($ this );
25-
26- \Locale::setDefault ('de_AT ' );
23+ \Locale::setDefault ('en ' );
2724 }
2825
2926 public function provideTransformations ()
@@ -44,6 +41,9 @@ public function provideTransformations()
4441 */
4542 public function testTransform ($ from , $ to , $ locale )
4643 {
44+ // Since we test against other locales, we need the full implementation
45+ IntlTestHelper::requireFullIntl ($ this );
46+
4747 \Locale::setDefault ($ locale );
4848
4949 $ transformer = new NumberToLocalizedStringTransformer ();
@@ -67,6 +67,9 @@ public function provideTransformationsWithGrouping()
6767 */
6868 public function testTransformWithGrouping ($ from , $ to , $ locale )
6969 {
70+ // Since we test against other locales, we need the full implementation
71+ IntlTestHelper::requireFullIntl ($ this );
72+
7073 \Locale::setDefault ($ locale );
7174
7275 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -76,6 +79,11 @@ public function testTransformWithGrouping($from, $to, $locale)
7679
7780 public function testTransformWithPrecision ()
7881 {
82+ // Since we test against "de_AT", we need the full implementation
83+ IntlTestHelper::requireFullIntl ($ this );
84+
85+ \Locale::setDefault ('de_AT ' );
86+
7987 $ transformer = new NumberToLocalizedStringTransformer (2 );
8088
8189 $ this ->assertEquals ('1234,50 ' , $ transformer ->transform (1234.5 ));
@@ -84,6 +92,11 @@ public function testTransformWithPrecision()
8492
8593 public function testTransformWithRoundingMode ()
8694 {
95+ // Since we test against "de_AT", we need the full implementation
96+ IntlTestHelper::requireFullIntl ($ this );
97+
98+ \Locale::setDefault ('de_AT ' );
99+
87100 $ transformer = new NumberToLocalizedStringTransformer (null , null , NumberToLocalizedStringTransformer::ROUND_DOWN );
88101 $ this ->assertEquals ('1234,547 ' , $ transformer ->transform (1234.547 ), '->transform() only applies rounding mode if precision set ' );
89102
@@ -96,6 +109,9 @@ public function testTransformWithRoundingMode()
96109 */
97110 public function testReverseTransform ($ to , $ from , $ locale )
98111 {
112+ // Since we test against other locales, we need the full implementation
113+ IntlTestHelper::requireFullIntl ($ this );
114+
99115 \Locale::setDefault ($ locale );
100116
101117 $ transformer = new NumberToLocalizedStringTransformer ();
@@ -108,6 +124,9 @@ public function testReverseTransform($to, $from, $locale)
108124 */
109125 public function testReverseTransformWithGrouping ($ to , $ from , $ locale )
110126 {
127+ // Since we test against other locales, we need the full implementation
128+ IntlTestHelper::requireFullIntl ($ this );
129+
111130 \Locale::setDefault ($ locale );
112131
113132 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -122,6 +141,9 @@ public function testReverseTransformWithGroupingAndFixedSpaces()
122141 $ this ->markTestSkipped ('The "mbstring" extension is required for this test. ' );
123142 }
124143
144+ // Since we test against other locales, we need the full implementation
145+ IntlTestHelper::requireFullIntl ($ this );
146+
125147 \Locale::setDefault ('ru ' );
126148
127149 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -131,6 +153,11 @@ public function testReverseTransformWithGroupingAndFixedSpaces()
131153
132154 public function testReverseTransformWithGroupingButWithoutGroupSeparator ()
133155 {
156+ // Since we test against "de_AT", we need the full implementation
157+ IntlTestHelper::requireFullIntl ($ this );
158+
159+ \Locale::setDefault ('de_AT ' );
160+
134161 $ transformer = new NumberToLocalizedStringTransformer (null , true );
135162
136163 // omit group separator
@@ -140,6 +167,9 @@ public function testReverseTransformWithGroupingButWithoutGroupSeparator()
140167
141168 public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot ()
142169 {
170+ // Since we test against other locales, we need the full implementation
171+ IntlTestHelper::requireFullIntl ($ this );
172+
143173 \Locale::setDefault ('fr ' );
144174 $ transformer = new NumberToLocalizedStringTransformer (null , true );
145175
@@ -157,6 +187,11 @@ public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot()
157187 */
158188 public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot ()
159189 {
190+ // Since we test against "de_AT", we need the full implementation
191+ IntlTestHelper::requireFullIntl ($ this );
192+
193+ \Locale::setDefault ('de_AT ' );
194+
160195 $ transformer = new NumberToLocalizedStringTransformer (null , true );
161196
162197 $ transformer ->reverseTransform ('1.234.5 ' );
@@ -167,13 +202,21 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot()
167202 */
168203 public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep ()
169204 {
205+ // Since we test against "de_AT", we need the full implementation
206+ IntlTestHelper::requireFullIntl ($ this );
207+
208+ \Locale::setDefault ('de_AT ' );
209+
170210 $ transformer = new NumberToLocalizedStringTransformer (null , true );
171211
172212 $ transformer ->reverseTransform ('1234.5 ' );
173213 }
174214
175215 public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupingUsed ()
176216 {
217+ // Since we test against other locales, we need the full implementation
218+ IntlTestHelper::requireFullIntl ($ this );
219+
177220 \Locale::setDefault ('fr ' );
178221 $ transformer = new NumberToLocalizedStringTransformer ();
179222
@@ -183,6 +226,9 @@ public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupin
183226
184227 public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsNotComma ()
185228 {
229+ // Since we test against other locales, we need the full implementation
230+ IntlTestHelper::requireFullIntl ($ this );
231+
186232 \Locale::setDefault ('bg ' );
187233 $ transformer = new NumberToLocalizedStringTransformer (null , true );
188234
@@ -200,7 +246,6 @@ public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsNotComma()
200246 */
201247 public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma ()
202248 {
203- \Locale::setDefault ('en ' );
204249 $ transformer = new NumberToLocalizedStringTransformer (null , true );
205250
206251 $ transformer ->reverseTransform ('1,234,5 ' );
@@ -211,15 +256,13 @@ public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma()
211256 */
212257 public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsCommaWithNoGroupSep ()
213258 {
214- \Locale::setDefault ('en ' );
215259 $ transformer = new NumberToLocalizedStringTransformer (null , true );
216260
217261 $ transformer ->reverseTransform ('1234,5 ' );
218262 }
219263
220264 public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsCommaButNoGroupingUsed ()
221265 {
222- \Locale::setDefault ('en ' );
223266 $ transformer = new NumberToLocalizedStringTransformer ();
224267
225268 $ this ->assertEquals (1234.5 , $ transformer ->reverseTransform ('1234,5 ' ));
@@ -339,6 +382,9 @@ public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte()
339382 $ this ->markTestSkipped ('The "mbstring" extension is required for this test. ' );
340383 }
341384
385+ // Since we test against other locales, we need the full implementation
386+ IntlTestHelper::requireFullIntl ($ this );
387+
342388 \Locale::setDefault ('ru ' );
343389
344390 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -356,6 +402,9 @@ public function testReverseTransformIgnoresTrailingSpacesInExceptionMessage()
356402 $ this ->markTestSkipped ('The "mbstring" extension is required for this test. ' );
357403 }
358404
405+ // Since we test against other locales, we need the full implementation
406+ IntlTestHelper::requireFullIntl ($ this );
407+
359408 \Locale::setDefault ('ru ' );
360409
361410 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -384,6 +433,9 @@ public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte()
384433 $ this ->markTestSkipped ('The "mbstring" extension is required for this test. ' );
385434 }
386435
436+ // Since we test against other locales, we need the full implementation
437+ IntlTestHelper::requireFullIntl ($ this );
438+
387439 \Locale::setDefault ('ru ' );
388440
389441 $ transformer = new NumberToLocalizedStringTransformer (null , true );
0 commit comments