public function testRenderEvent(): void
{ if (!\
class_exists(StorefrontRenderEvent::
class)) { // storefront dependency not installed
return;
} $request =
new Request();
$request->attributes->
set('_route', 'frontend.home.page'
);
$event =
new StorefrontRenderEvent('',
[],
$request,
$this->
createMock(SalesChannelContext::
class));
$listener =
$this->
getMockBuilder(CallableClass::
class)->
getMock();
$listener->
expects(static::
once())->
method('__invoke'
);
$dispatcher =
new EventDispatcher();
$dispatcher->
addListener('frontend.home.page.render',
$listener);
$subscriber =
new RouteEventSubscriber($dispatcher);
$subscriber->
render($event);
}}