static::
assertSame(200,
$response->
getStatusCode());
static::
assertCount(1,
$content);
static::
assertSame('danger',
$type);
} private function createRequest(): Request
{ $request =
new Request();
$request->
setSession($this->
getSession());
$session =
$request->
getSession();
$session->
set(PlatformRequest::HEADER_CONTEXT_TOKEN, Random::
getAlphanumericString(32
));
$this->
addDomain($this->domain
);
$salesChannelContext =
$this->
getContainer()->
get(SalesChannelContextFactory::
class) ->
create(Uuid::
randomHex(), TestDefaults::SALES_CHANNEL
);
$request->headers->
set(PlatformRequest::HEADER_CONTEXT_TOKEN, Random::
getAlphanumericString(32
));
$request->attributes->
add([RequestTransformer::STOREFRONT_URL =>
$this->domain
]);
$request->attributes->
add([PlatformRequest::ATTRIBUTE_CONTEXT_OBJECT =>
$salesChannelContext]);
$request->attributes->
add([PlatformRequest::ATTRIBUTE_SALES_CHANNEL_ID => TestDefaults::SALES_CHANNEL
]);
$request->attributes->
add(['_route' => 'frontend.account.register.page', SalesChannelRequest::ATTRIBUTE_IS_SALES_CHANNEL_REQUEST => true
]);
$request->attributes->
add([RequestTransformer::STOREFRONT_URL, 'shopware.test'
]);