Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
TranslationPushCommand example
$provider
->
expects
(
$this
->
once
(
)
)
->
method
(
'write'
)
->
with
(
$localTranslatorBag
->
diff
(
$providerReadTranslatorBag
)
)
;
$provider
->
expects
(
$this
->
once
(
)
)
->
method
(
'__toString'
)
->
willReturn
(
'null://default'
)
;
$reader
=
new
TranslationReader
(
)
;
$reader
->
addLoader
(
'xlf',
new
XliffFileLoader
(
)
)
;
$command
=
new
TranslationPushCommand
(
new
TranslationProviderCollection
(
[
'loco' =>
$provider
,
]
)
,
$reader
,
[
$this
->translationAppDir.'/translations'
]
,
$locales
)
;
$application
=
new
Application
(
)
;
$application
->
add
(
$command
)
;
$tester
=
new
CommandTester
(
$application
->
find
(
'translation:push'
)
)
;