$this->
catchEvent(CustomerDoubleOptInRegistrationEvent::
class,
$event);
$registerController->
register($request,
$data,
$this->salesChannelContext
);
$customer =
$customerRepository->
search(new Criteria([$event->
getCustomer()->
getId()]),
$this->salesChannelContext->
getContext());
$queryData =
new QueryDataBag();
$queryData->
set('redirectTo', 'frontend.checkout.confirm.page'
);
$queryData->
set('hash',
$customer->
first()->
getHash());
$queryData->
set('em',
hash('sha1',
(string) $event->
getCustomer()->
getEmail()));
/** @var RedirectResponse $response */
$response =
$registerController->
confirmRegistration($this->salesChannelContext,
$queryData);
static::
assertEquals(302,
$response->
getStatusCode());
static::
assertInstanceOf(RedirectResponse::
class,
$response);
static::
assertEquals('/checkout/confirm',
$response->
getTargetUrl());
} public function testAccountRegisterPageLoadedHookScriptsAreExecuted(): void
{ $response =
$this->
request('GET', '/account/register',
[]);
static::
assertEquals(200,
$response->
getStatusCode());