Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createUserForEachLanguage example
protected
function
setUp
(
)
: void
{
$this
->connection =
$this
->
getContainer
(
)
->
get
(
Connection::
class
)
;
$this
->
cleanUpSalesChannels
(
)
;
$this
->languages =
$this
->
fetchLanguages
(
)
;
$this
->
createSalesChannels
(
)
;
$this
->
createUserForEachLanguage
(
)
;
}
public
function
testMigrationCopiesSalesChannelIdsIntoUserConfig
(
)
: void
{
$migration
=
$this
->
getMigration
(
)
;
$migration
->
update
(
$this
->connection
)
;
$expectedIds
=
$this
->
fetchExpectedSalesChannelIds
(
array_values
(
$this
->languages
)
)
;
$configs
=
$this
->
fetchConfigs
(
)
;
foreach
(
$configs
as
$locale
=>
$config
)
{