CustomerGroupRegistrationPage example

static::assertSame('frontend.checkout.register.page', $this->controller->renderStorefrontParameters['errorRoute'] ?? '');
        static::assertInstanceOf(CheckoutRegisterPageLoadedHook::class$this->controller->calledHook);
    }

    public function testCustomerGroupRegistration(): void
    {
        $context = Generator::createSalesChannelContext();
        $context->assign(['customer' => null]);
        $request = new Request();
        $request->attributes->set('_route', 'frontend.account.customer-group-registration.page');
        $dataBag = new RequestDataBag();
        $page = new CustomerGroupRegistrationPage();
        $page->setGroup(new CustomerGroupEntity());
        $customerGroupId = Uuid::randomHex();

        $this->customerGroupRegistrationPageLoader->expects(static::once())
            ->method('load')
            ->with($request$context)
            ->willReturn($page);

        $this->controller->customerGroupRegistration($customerGroupId$request$dataBag$context);

        static::assertSame($page$this->controller->renderStorefrontParameters['page']);
        
Home | Imprint | This part of the site doesn't use cookies.