$salesChannel =
array_merge([ 'id' =>
$salesChannelOverride['id'
] ?? Uuid::
randomHex(),
'typeId' => Defaults::SALES_CHANNEL_TYPE_STOREFRONT,
'name' => 'API Test case sales channel',
'accessKey' => AccessKeyHelper::
generateAccessKey('sales-channel'
),
'languageId' => Defaults::LANGUAGE_SYSTEM,
'snippetSetId' =>
$this->
getSnippetSetIdForLocale('en-GB'
),
'currencyId' => Defaults::CURRENCY,
'paymentMethodId' =>
$paymentMethod->
getId(),
'paymentMethods' =>
[['id' =>
$paymentMethod->
getId()]],
'shippingMethodId' =>
$this->
getAvailableShippingMethod()->
getId(),
'navigationCategoryId' =>
$this->
getValidCategoryId(),
'countryId' =>
$this->
getValidCountryId(null
),
'currencies' =>
[['id' => Defaults::CURRENCY
]],
'languages' =>
$salesChannelOverride['languages'
] ??
[['id' => Defaults::LANGUAGE_SYSTEM
]],
'customerGroupId' => TestDefaults::FALLBACK_CUSTOMER_GROUP,
'domains' =>
[ [ 'languageId' => Defaults::LANGUAGE_SYSTEM,
'currencyId' => Defaults::CURRENCY,
'snippetSetId' =>
$this->
getSnippetSetIdForLocale('en-GB'
),
'url' => 'http://localhost',
],