[TranslationUpdateCommand] fixed undefined resultMessage var.
This commit is contained in:
parent
829c011b49
commit
1999e89e7c
@ -150,6 +150,8 @@ EOF
|
||||
return;
|
||||
}
|
||||
|
||||
$resultMessage = 'Translation files were successfully updated.';
|
||||
|
||||
// show compiled list of messages
|
||||
if (true === $input->getOption('dump-messages')) {
|
||||
$extractedMessagesCount = 0;
|
||||
@ -205,8 +207,6 @@ EOF
|
||||
|
||||
if (true === $input->getOption('dump-messages')) {
|
||||
$resultMessage .= ' and translation files were updated.';
|
||||
} else {
|
||||
$resultMessage = 'Translation files were successfully updated.';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,14 @@ class TranslationUpdateCommandTest extends \PHPUnit_Framework_TestCase
|
||||
$tester = $this->createCommandTester($this->getContainer(array('foo' => 'foo')));
|
||||
$tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true));
|
||||
$this->assertRegExp('/foo/', $tester->getDisplay());
|
||||
$this->assertRegExp('/2 messages were successfully extracted/', $tester->getDisplay());
|
||||
}
|
||||
|
||||
public function testWriteMessages()
|
||||
{
|
||||
$tester = $this->createCommandTester($this->getContainer(array('foo' => 'foo')));
|
||||
$tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--force' => true));
|
||||
$this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay());
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
|
Reference in New Issue
Block a user