$response =
$this->browser->
getResponse();
// After login successfully, the context token will be set in the header
$contextToken =
$response->headers->
get(PlatformRequest::HEADER_CONTEXT_TOKEN
) ?? '';
static::
assertNotEmpty($contextToken);
$criteria =
new Criteria([$customerId]);
/** @var CustomerEntity $customer */
$customer =
$this->
getContainer()->
get('customer.repository'
)->
search($criteria, Context::
createDefaultContext())->
first();
static::
assertNull($customer->
getLegacyEncoder());
static::
assertNull($customer->
getLegacyPassword());
} private function createCustomer(string
$password, ?string
$email = null, bool
$addLegacyPassword = false
): string
{ $customerId = Uuid::
randomHex();
$addressId = Uuid::
randomHex();
$customer =
[ 'id' =>
$customerId,
'salesChannelId' => TestDefaults::SALES_CHANNEL,
'defaultShippingAddress' =>
[