use Symfony\Component\Translation\Reader\TranslationReader;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\Writer\TranslationWriter;
class TranslationUpdateCommandTest extends TestCase
{ private Filesystem
$fs;
private string
$translationDir;
public function testDumpMessagesAndCleanWithDeprecatedCommandName() { $tester =
$this->
createCommandTester(['messages' =>
['foo' => 'foo'
]]);
$tester->
execute(['command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true
]);
$this->
assertMatchesRegularExpression('/foo/',
$tester->
getDisplay());
$this->
assertMatchesRegularExpression('/1 message was successfully extracted/',
$tester->
getDisplay());
} public function testDumpMessagesAndClean() { $tester =
$this->
createCommandTester(['messages' =>
['foo' => 'foo'
]]);
$tester->
execute(['command' => 'translation:extract', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true
]);
$this->
assertMatchesRegularExpression('/foo/',
$tester->
getDisplay());
$this->
assertMatchesRegularExpression('/1 message was successfully extracted/',
$tester->
getDisplay());
}