$context =
$this->
createSalesChannelContextWithLoggedInCustomerAndWithNavigation();
/** @var CheckoutConfirmPageLoadedEvent $event */
$event = null;
$this->
catchEvent(CheckoutConfirmPageLoadedEvent::
class,
$event);
$page =
$this->
getPageLoader()->
load($request,
$context);
static::
assertInstanceOf(CheckoutConfirmPage::
class,
$page);
static::
assertSame(0.0,
$page->
getCart()->
getPrice()->
getNetPrice());
static::
assertSame($context->
getToken(),
$page->
getCart()->
getToken());
static::
assertCount(StorefrontPageTestConstants::AVAILABLE_SHIPPING_METHOD_COUNT,
$page->
getShippingMethods());
static::
assertCount(StorefrontPageTestConstants::AVAILABLE_PAYMENT_METHOD_COUNT,
$page->
getPaymentMethods());
static::
assertNotEmpty($page->
getPaymentMethods());
self::
assertPageEvent(CheckoutConfirmPageLoadedEvent::
class,
$event,
$context,
$request,
$page);
} public function testItIgnoresUnavailableShippingMethods(): void
{ $request =
new Request();
$context =
$this->
createSalesChannelContextWithLoggedInCustomerAndWithNavigation();
/** @var EntityRepository $shippingMethodRepository */