Skip to content

Commit 0954f3d

Browse files
bug #19926 [FrameworkBundle] Fix TranslationUpdateCommand tests after a merge (jakzal)
This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] Fix TranslationUpdateCommand tests after a merge | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19921 | License | MIT | Doc PR | - #19325 relied on a wrong count of messages, which was fixed by #19878. Additionally, the `getContainer()` method on the master branch expect messages to be indexed by domain. Commits ------- d093c40 [FrameworkBundle] Fix TranslationUpdateCommand tests after a merge
2 parents 929b313 + d093c40 commit 0954f3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testDumpMessagesAndClean()
3333

3434
public function testDumpTwoMessagesAndClean()
3535
{
36-
$tester = $this->createCommandTester($this->getContainer(array('foo' => 'foo', 'bar' => 'bar')));
36+
$tester = $this->createCommandTester($this->getContainer(array('messages' => array('foo' => 'foo', 'bar' => 'bar'))));
3737
$tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true));
3838
$this->assertRegExp('/foo/', $tester->getDisplay());
3939
$this->assertRegExp('/bar/', $tester->getDisplay());
@@ -45,7 +45,7 @@ public function testDumpMessagesForSpecificDomain()
4545
$tester = $this->createCommandTester($this->getContainer(array('messages' => array('foo' => 'foo'), 'mydomain' => array('bar' => 'bar'))));
4646
$tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true, '--domain' => 'mydomain'));
4747
$this->assertRegExp('/bar/', $tester->getDisplay());
48-
$this->assertRegExp('/2 messages were successfully extracted/', $tester->getDisplay());
48+
$this->assertRegExp('/1 message was successfully extracted/', $tester->getDisplay());
4949
}
5050

5151
public function testWriteMessages()

0 commit comments

Comments
 (0)