->
with($domains,
$locales) ->
willReturn($providerReadTranslatorBag);
$provider->
expects($this->
once()) ->
method('__toString'
) ->
willReturn('null://default'
);
$tester =
$this->
createCommandTester($provider,
$locales,
$domains);
$tester->
execute(['--locales' =>
['en', 'fr'
], '--domains' =>
['messages', 'messages+intl-icu'
]]);
$this->
assertStringContainsString('[OK] New translations from "null" has been written locally (for "en, fr" locale(s), and "messages, messages+intl-icu"',
trim($tester->
getDisplay()));
$this->
assertXmlStringEqualsXmlString(<<<XLIFF
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" target-language="en" datatype="plaintext" original="file.ext">
<header>
<tool tool-id="symfony" tool-name="Symfony"/>
</header>
<body>
<trans-unit id="994ixRL" resname="new.foo">
<source>new.foo</source>
<target>newFoo</target>
</trans-unit>
<trans-unit id="7bRlYkK" resname="note">
<source>note</source>
<target>NOTE</target>
</trans-unit>
</body>
</file>
</xliff>