OffcanvasCartPageLoader example


class OffcanvasCartPageLoaderTest extends TestCase
{
    public function testOffcanvasCartPageReturned(): void
    {
        $pageLoader = $this->createMock(GenericPageLoader::class);
        $pageLoader
            ->method('load')
            ->willReturn(new Page());

        $offcanvasCartPageLoader = new OffcanvasCartPageLoader(
            $this->createMock(EventDispatcher::class),
            $this->createMock(StorefrontCartFacade::class),
            $pageLoader,
            $this->createMock(ShippingMethodRoute::class)
        );

        $page = $offcanvasCartPageLoader->load(
            new Request(),
            $this->createMock(SalesChannelContext::class)
        );

        
Home | Imprint | This part of the site doesn't use cookies.