$slot->
setUniqueIdentifier('id'
);
$slot->
setType('product-description-reviews'
);
$collection =
$this->productDescriptionReviewResolver->
collect($slot,
$resolverContext);
static::
assertNull($collection);
} public function testEnrichWithoutContext(): void
{ $resolverContext =
new ResolverContext($this->
createMock(SalesChannelContext::
class),
new Request());
$result =
new ElementDataCollection();
$slot =
new CmsSlotEntity();
$slot->
setUniqueIdentifier('id'
);
$slot->
setType('product-description-reviews'
);
$this->productDescriptionReviewResolver->
enrich($slot,
$resolverContext,
$result);
/** @var ProductDescriptionReviewsStruct|null $productDescriptionReviewStruct */
$productDescriptionReviewStruct =
$slot->
getData();
static::
assertInstanceOf(ProductDescriptionReviewsStruct::
class,
$productDescriptionReviewStruct);
static::
assertNull($productDescriptionReviewStruct->
getProduct());
}