getCustomerCart example

$context = Context::createDefaultContext();
        $salesChannelContext->method('getContext')->willReturn($context);

        $event = new BeforeCartMergeEvent(
            $customerCart,
            $guestCart,
            $mergeableLineItems,
            $salesChannelContext
        );

        static::assertSame($customerCart$event->getCustomerCart());
        static::assertSame($guestCart$event->getGuestCart());
        static::assertSame($mergeableLineItems$event->getMergeableLineItems());
        static::assertSame($salesChannelContext$event->getSalesChannelContext());
        static::assertSame($context$event->getContext());
    }
}
Home | Imprint | This part of the site doesn't use cookies.