Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
fetchConfigs example
$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
)
{
$language
=
$this
->languages
[
$locale
]
;
$actual
=
json_decode
(
(string)
$config
, null, 512, \JSON_THROW_ON_ERROR
)
;
$expected
= \
array_slice
(
$expectedIds
[
$language
]
, 0, self::MAX_RESULTS
)
;
static
::
assertSame
(
$expected
,
$actual
)
;
static
::
assertCount
(
self::MAX_RESULTS,
$actual
)
;
}
}