public function testLoadSalesChannelConfig(): void
{ $base =
$this->
getBaseConfig('invoice'
);
$globalConfig = DocumentConfigurationFactory::
createConfiguration([ 'companyName' => 'Test corp.',
'displayCompanyAddress' => true,
],
$base);
$this->
upsertBaseConfig($globalConfig->
jsonSerialize(), InvoiceRenderer::TYPE
);
$salesChannelConfig = DocumentConfigurationFactory::
mergeConfiguration($globalConfig,
[ 'companyName' => 'Custom corp.',
'displayCompanyAddress' => false,
'pageSize' => 'a5',
]);
$salesChannelId =
$this->salesChannelContext->
getSalesChannel()->
getId();
$this->
upsertBaseConfig($salesChannelConfig->
jsonSerialize(), InvoiceRenderer::TYPE,
$salesChannelId);
$config =
$this->documentConfigLoader->
load(InvoiceRenderer::TYPE,
$salesChannelId,
$this->context
);
$config =
$config->
jsonSerialize();