$event = null;
$this->
catchEvent(MinimalQuickViewPageLoadedEvent::
class,
$event);
$this->
expectException(ProductNotFoundException::
class);
$this->
getPageLoader()->
load($request,
$context);
} public function testItDoesLoadATestProduct(): void
{ $context =
$this->
createSalesChannelContext();
$product =
$this->
getRandomProduct($context);
$request =
new Request([],
[],
['productId' =>
$product->
getId()]);
$event = null;
$this->
catchEvent(MinimalQuickViewPageLoadedEvent::
class,
$event);
$page =
$this->
getPageLoader()->
load($request,
$context);
static::
assertInstanceOf(MinimalQuickViewPage::
class,
$page);
static::
assertSame(StorefrontPageTestConstants::PRODUCT_NAME,
$page->
getProduct()->
getName());
self::
assertPageEvent(MinimalQuickViewPageLoadedEvent::
class,
$event,
$context,
$request,
$page);
}