/** @var SalesChannelEntity $salesChannel */
$salesChannel =
$salesChannelRepository->
search( (new Criteria())->
addFilter(new EqualsFilter('typeId', Defaults::SALES_CHANNEL_TYPE_STOREFRONT
)),
Context::
createDefaultContext() )->
first();
$header = 'HTTP_' .
str_replace('-', '_',
mb_strtoupper(PlatformRequest::HEADER_ACCESS_KEY
));
$browser->
setServerParameter($header,
$salesChannel->
getAccessKey());
$browser->
setServerParameter('test-sales-channel-id',
$salesChannel->
getId());
$customerId = Uuid::
randomHex();
$this->
createCustomerWithEmail($customerId, 'foo@foo.de', 'bar12345',
$salesChannel);
$browser->
request( 'POST',
$_SERVER['APP_URL'
] . '/account/login',
[ 'username' => 'foo@foo.de',
'password' => 'bar12345',
] );
static::
assertSame(200,
$browser->
getResponse()->
getStatusCode());