$reader =
new Definition();
$translator =
(new Definition()) ->
setArguments([null, null, null, null
]);
$container =
new ContainerBuilder();
$container->
setDefinition('translator.default',
$translator);
$container->
setDefinition('translation.reader',
$reader);
$container->
setDefinition('translation.xliff_loader',
$loader);
$pass =
new TranslatorPass();
$pass->
process($container);
$expectedReader =
(new Definition()) ->
addMethodCall('addLoader',
['xliff',
new Reference('translation.xliff_loader'
)]) ->
addMethodCall('addLoader',
['xlf',
new Reference('translation.xliff_loader'
)]) ;
$this->
assertEquals($expectedReader,
$reader);
$expectedLoader =
(new Definition()) ->
addTag('translation.loader',
['alias' => 'xliff', 'legacy-alias' => 'xlf'
]) ;