$criteria =
(new Criteria()) ->
addAssociation('manufacturer.media'
) ->
addAssociation('options.group'
) ->
addAssociation('properties.group'
) ->
addAssociation('mainCategories.category'
) ->
addAssociation('media'
);
$productDetailRouteMock =
$this->
createMock(ProductDetailRoute::
class);
$productDetailRouteMock ->
method('load'
) ->
with($productId,
$request,
$salesChannelContext,
$criteria) ->
willReturn(new ProductDetailRouteResponse($product, null
));
return new ProductPageLoader( $this->
createMock(GenericPageLoader::
class),
$this->
createMock(EventDispatcherInterface::
class),
$productDetailRouteMock,
$this->
createMock(ProductReviewLoader::
class),
$this->
createMock(ProductCrossSellingRoute::
class) );
} /**
* @param array<string, array<string, array<string, array<string, array<string, string>>>>> $reviews
*/