Skip to content

Commit 6c19fd7

Browse files
Merge branch '4.4' into 5.2
* 4.4: - PHPUnit on GitHub Actions
2 parents 9618aa0 + 114715a commit 6c19fd7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Translation/Test/TranslatorTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class TranslatorTest extends TestCase
3535
protected function setUp(): void
3636
{
3737
$this->defaultLocale = \Locale::getDefault();
38+
\Locale::setDefault('en');
3839
}
3940

4041
protected function tearDown(): void
@@ -65,7 +66,6 @@ public function testTrans($expected, $id, $parameters)
6566
public function testTransChoiceWithExplicitLocale($expected, $id, $number)
6667
{
6768
$translator = $this->getTranslator();
68-
$translator->setLocale('en');
6969

7070
$this->assertEquals($expected, $translator->trans($id, ['%count%' => $number]));
7171
}
@@ -75,8 +75,6 @@ public function testTransChoiceWithExplicitLocale($expected, $id, $number)
7575
*/
7676
public function testTransChoiceWithDefaultLocale($expected, $id, $number)
7777
{
78-
\Locale::setDefault('en');
79-
8078
$translator = $this->getTranslator();
8179

8280
$this->assertEquals($expected, $translator->trans($id, ['%count%' => $number]));
@@ -85,7 +83,6 @@ public function testTransChoiceWithDefaultLocale($expected, $id, $number)
8583
public function testGetSetLocale()
8684
{
8785
$translator = $this->getTranslator();
88-
$translator->setLocale('en');
8986

9087
$this->assertEquals('en', $translator->getLocale());
9188
}

0 commit comments

Comments
 (0)