Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
DataCollectorTranslator example
$this
->
assertEquals
(
$expectedMessages
,
$collector
->
getCollectedMessages
(
)
)
;
}
private
function
createCollector
(
)
{
$translator
=
new
Translator
(
'en'
)
;
$translator
->
addLoader
(
'array',
new
ArrayLoader
(
)
)
;
$translator
->
addResource
(
'array',
[
'foo' => 'foo (en)'
]
, 'en'
)
;
$translator
->
addResource
(
'array',
[
'bar' => 'bar (fr)'
]
, 'fr'
)
;
$translator
->
addResource
(
'array',
[
'bar_ru' => 'bar (ru)'
]
, 'ru'
)
;
return
new
DataCollectorTranslator
(
$translator
)
;
}
}