@@ -35,6 +35,7 @@ class TranslatorTest extends TestCase
35
35
protected function setUp (): void
36
36
{
37
37
$ this ->defaultLocale = \Locale::getDefault ();
38
+ \Locale::setDefault ('en ' );
38
39
}
39
40
40
41
protected function tearDown (): void
@@ -65,7 +66,6 @@ public function testTrans($expected, $id, $parameters)
65
66
public function testTransChoiceWithExplicitLocale ($ expected , $ id , $ number )
66
67
{
67
68
$ translator = $ this ->getTranslator ();
68
- $ translator ->setLocale ('en ' );
69
69
70
70
$ this ->assertEquals ($ expected , $ translator ->trans ($ id , ['%count% ' => $ number ]));
71
71
}
@@ -75,8 +75,6 @@ public function testTransChoiceWithExplicitLocale($expected, $id, $number)
75
75
*/
76
76
public function testTransChoiceWithDefaultLocale ($ expected , $ id , $ number )
77
77
{
78
- \Locale::setDefault ('en ' );
79
-
80
78
$ translator = $ this ->getTranslator ();
81
79
82
80
$ this ->assertEquals ($ expected , $ translator ->trans ($ id , ['%count% ' => $ number ]));
@@ -85,7 +83,6 @@ public function testTransChoiceWithDefaultLocale($expected, $id, $number)
85
83
public function testGetSetLocale ()
86
84
{
87
85
$ translator = $ this ->getTranslator ();
88
- $ translator ->setLocale ('en ' );
89
86
90
87
$ this ->assertEquals ('en ' , $ translator ->getLocale ());
91
88
}
0 commit comments