$filePath =
$urlGenerator->
getRelativeMediaUrl($document->
getDocumentMediaFile());
$fileSystem->
write($filePath, 'test123'
);
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());