$productId = Uuid::
randomHex();
$request =
new Request([],
[],
['productId' =>
$productId]);
$salesChannelContext =
$this->
getSalesChannelContext();
$reviews =
$this->
getCmsSlotConfig();
$productPageLoader =
$this->
getProductPageLoaderWithProduct($productId,
$reviews,
$request,
$salesChannelContext);
$page =
$productPageLoader->
load($request,
$salesChannelContext);
/** @phpstan-ignore-next-line $slot */
$slot =
$page->
getCmsPage()->
getSections()->
first()->
getBlocks()->
first()->
getSlots()->
first()->
getSlot();
static::
assertEquals($reviews,
json_decode((string) $slot, true, 512, \JSON_THROW_ON_ERROR
));
} /**
* @param array<string, array<string, array<string, array<string, array<string, string>>>>> $reviews
*/
private function getProductPageLoaderWithProduct(string
$productId, array
$reviews, Request
$request, SalesChannelContext
$salesChannelContext): ProductPageLoader
{ $product =
$this->
getProductWithReviews($productId,
$reviews);