$container->
set(SeoUrlPlaceholderHandlerInterface::
class,
$seoUrlReplacer);
$container->
set(SystemConfigService::
class,
static::
createMock(SystemConfigService::
class));
$this->controller->
setContainer($container);
$this->controller->
setTwig($twig);
$response =
$this->controller->
testRenderStorefront('test.html.twig'
);
static::
assertInstanceOf(StorefrontResponse::
class,
$response);
static::
assertSame('<html lang="en">test</html>',
$response->
getContent());
static::
assertSame('text/html',
$response->headers->
get('Content-Type'
));
static::
assertSame($context,
$response->
getContext());
} public function testRenderStorefrontWithException(): void
{ $context =
static::
createMock(SalesChannelContext::
class);
$request =
new Request( attributes:
[ 'sw-sales-channel-context' =>
$context,
'sw-storefront-url' => 'foo',
],
);