Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
fetchLanguages example
private
Connection
$connection
;
private
array
$languages
;
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
)
)
;