static::
assertTrue($fileSystem->
has($filePath));
$this->documentGenerator->
readDocument($document->
getId(),
$this->context, 'wrong code'
);
} public function testConfigurationWithSalesChannelOverride(): void
{ $base =
$this->
getBaseConfig(InvoiceRenderer::TYPE
);
$globalConfig =
$base instanceof DocumentBaseConfigEntity ?
$base->
getConfig() :
[];
$globalConfig['companyName'
] = 'Test corp.';
$globalConfig['displayCompanyAddress'
] = true;
$this->
upsertBaseConfig($globalConfig, InvoiceRenderer::TYPE
);
$salesChannelConfig =
[ 'companyName' => 'Custom corp.',
'displayCompanyAddress' => false,
];
$this->
upsertBaseConfig($salesChannelConfig, InvoiceRenderer::TYPE,
$this->salesChannelContext->
getSalesChannel()->
getId());
$operation =
new DocumentGenerateOperation($this->orderId
);
$documentId =
$this->documentGenerator->
generate(InvoiceRenderer::TYPE,
[$this->orderId =>
$operation],
$this->context
)->
getSuccess()->
first();
static::
assertNotNull($documentId);