Skip to content

Commit a80ac86

Browse files
Merge branch '5.2' into 5.3
* 5.2: - - PHPUnit on GitHub Actions
2 parents f24f074 + 6c19fd7 commit a80ac86

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
}
@@ -77,8 +77,6 @@ public function testTransChoiceWithExplicitLocale($expected, $id, $number)
7777
*/
7878
public function testTransChoiceWithDefaultLocale($expected, $id, $number)
7979
{
80-
\Locale::setDefault('en');
81-
8280
$translator = $this->getTranslator();
8381

8482
$this->assertEquals($expected, $translator->trans($id, ['%count%' => $number]));
@@ -87,7 +85,6 @@ public function testTransChoiceWithDefaultLocale($expected, $id, $number)
8785
public function testGetSetLocale()
8886
{
8987
$translator = $this->getTranslator();
90-
$translator->setLocale('en');
9188

9289
$this->assertEquals('en', $translator->getLocale());
9390
}

0 commit comments

Comments
 (0)