@@ -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 testTransformWithScale ()
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 testTransformWithScale()
8492
8593 public function transformWithRoundingProvider ()
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 return array (
88101 // towards positive infinity (1.6 -> 2, -1.6 -> -1)
89102 array (0 , 1234.5 , '1235 ' , NumberToLocalizedStringTransformer::ROUND_CEILING ),
@@ -183,6 +196,11 @@ public function testTransformWithRounding($scale, $input, $output, $roundingMode
183196
184197 public function testTransformDoesNotRoundIfNoScale ()
185198 {
199+ // Since we test against "de_AT", we need the full implementation
200+ IntlTestHelper::requireFullIntl ($ this );
201+
202+ \Locale::setDefault ('de_AT ' );
203+
186204 $ transformer = new NumberToLocalizedStringTransformer (null , null , NumberToLocalizedStringTransformer::ROUND_DOWN );
187205
188206 $ this ->assertEquals ('1234,547 ' , $ transformer ->transform (1234.547 ));
@@ -193,6 +211,9 @@ public function testTransformDoesNotRoundIfNoScale()
193211 */
194212 public function testReverseTransform ($ to , $ from , $ locale )
195213 {
214+ // Since we test against other locales, we need the full implementation
215+ IntlTestHelper::requireFullIntl ($ this );
216+
196217 \Locale::setDefault ($ locale );
197218
198219 $ transformer = new NumberToLocalizedStringTransformer ();
@@ -205,6 +226,9 @@ public function testReverseTransform($to, $from, $locale)
205226 */
206227 public function testReverseTransformWithGrouping ($ to , $ from , $ locale )
207228 {
229+ // Since we test against other locales, we need the full implementation
230+ IntlTestHelper::requireFullIntl ($ this );
231+
208232 \Locale::setDefault ($ locale );
209233
210234 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -219,6 +243,9 @@ public function testReverseTransformWithGroupingAndFixedSpaces()
219243 $ this ->markTestSkipped ('The "mbstring" extension is required for this test. ' );
220244 }
221245
246+ // Since we test against other locales, we need the full implementation
247+ IntlTestHelper::requireFullIntl ($ this );
248+
222249 \Locale::setDefault ('ru ' );
223250
224251 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -228,6 +255,11 @@ public function testReverseTransformWithGroupingAndFixedSpaces()
228255
229256 public function testReverseTransformWithGroupingButWithoutGroupSeparator ()
230257 {
258+ // Since we test against "de_AT", we need the full implementation
259+ IntlTestHelper::requireFullIntl ($ this );
260+
261+ \Locale::setDefault ('de_AT ' );
262+
231263 $ transformer = new NumberToLocalizedStringTransformer (null , true );
232264
233265 // omit group separator
@@ -343,6 +375,9 @@ public function testReverseTransformDoesNotRoundIfNoScale()
343375
344376 public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot ()
345377 {
378+ // Since we test against other locales, we need the full implementation
379+ IntlTestHelper::requireFullIntl ($ this );
380+
346381 \Locale::setDefault ('fr ' );
347382 $ transformer = new NumberToLocalizedStringTransformer (null , true );
348383
@@ -360,6 +395,11 @@ public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot()
360395 */
361396 public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot ()
362397 {
398+ // Since we test against "de_AT", we need the full implementation
399+ IntlTestHelper::requireFullIntl ($ this );
400+
401+ \Locale::setDefault ('de_AT ' );
402+
363403 $ transformer = new NumberToLocalizedStringTransformer (null , true );
364404
365405 $ transformer ->reverseTransform ('1.234.5 ' );
@@ -370,13 +410,21 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot()
370410 */
371411 public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep ()
372412 {
413+ // Since we test against "de_AT", we need the full implementation
414+ IntlTestHelper::requireFullIntl ($ this );
415+
416+ \Locale::setDefault ('de_AT ' );
417+
373418 $ transformer = new NumberToLocalizedStringTransformer (null , true );
374419
375420 $ transformer ->reverseTransform ('1234.5 ' );
376421 }
377422
378423 public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupingUsed ()
379424 {
425+ // Since we test against other locales, we need the full implementation
426+ IntlTestHelper::requireFullIntl ($ this );
427+
380428 \Locale::setDefault ('fr ' );
381429 $ transformer = new NumberToLocalizedStringTransformer ();
382430
@@ -386,6 +434,9 @@ public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupin
386434
387435 public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsNotComma ()
388436 {
437+ // Since we test against other locales, we need the full implementation
438+ IntlTestHelper::requireFullIntl ($ this );
439+
389440 \Locale::setDefault ('bg ' );
390441 $ transformer = new NumberToLocalizedStringTransformer (null , true );
391442
@@ -403,7 +454,6 @@ public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsNotComma()
403454 */
404455 public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma ()
405456 {
406- \Locale::setDefault ('en ' );
407457 $ transformer = new NumberToLocalizedStringTransformer (null , true );
408458
409459 $ transformer ->reverseTransform ('1,234,5 ' );
@@ -414,15 +464,13 @@ public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma()
414464 */
415465 public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsCommaWithNoGroupSep ()
416466 {
417- \Locale::setDefault ('en ' );
418467 $ transformer = new NumberToLocalizedStringTransformer (null , true );
419468
420469 $ transformer ->reverseTransform ('1234,5 ' );
421470 }
422471
423472 public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsCommaButNoGroupingUsed ()
424473 {
425- \Locale::setDefault ('en ' );
426474 $ transformer = new NumberToLocalizedStringTransformer ();
427475
428476 $ this ->assertEquals (1234.5 , $ transformer ->reverseTransform ('1234,5 ' ));
@@ -542,6 +590,9 @@ public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte()
542590 $ this ->markTestSkipped ('The "mbstring" extension is required for this test. ' );
543591 }
544592
593+ // Since we test against other locales, we need the full implementation
594+ IntlTestHelper::requireFullIntl ($ this );
595+
545596 \Locale::setDefault ('ru ' );
546597
547598 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -559,6 +610,9 @@ public function testReverseTransformIgnoresTrailingSpacesInExceptionMessage()
559610 $ this ->markTestSkipped ('The "mbstring" extension is required for this test. ' );
560611 }
561612
613+ // Since we test against other locales, we need the full implementation
614+ IntlTestHelper::requireFullIntl ($ this );
615+
562616 \Locale::setDefault ('ru ' );
563617
564618 $ transformer = new NumberToLocalizedStringTransformer (null , true );
@@ -587,6 +641,9 @@ public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte()
587641 $ this ->markTestSkipped ('The "mbstring" extension is required for this test. ' );
588642 }
589643
644+ // Since we test against other locales, we need the full implementation
645+ IntlTestHelper::requireFullIntl ($ this );
646+
590647 \Locale::setDefault ('ru ' );
591648
592649 $ transformer = new NumberToLocalizedStringTransformer (null , true );
0 commit comments