$systemConfigService =
new StaticSystemConfigService([ TestDefaults::SALES_CHANNEL =>
[ 'core.loginRegistration.showAccountTypeSelection' => true,
'core.loginRegistration.passwordMinLength' => '8',
],
'core.systemWideLoginRegistration.isCustomerBoundToSalesChannel' => true,
]);
$result =
$this->
createMock(EntitySearchResult::
class);
$customerEntity =
new CustomerEntity();
$customerEntity->
setDoubleOptInRegistration(false
);
$customerEntity->
setId('customer-1'
);
$customerEntity->
setGuest(false
);
$result->
method('first'
)->
willReturn($customerEntity);
$customerRepository =
$this->
createMock(EntityRepository::
class);
$customerRepository->
method('search'
)->
willReturn($result);
$customerRepository ->
expects(static::
once()) ->
method('create'
) ->
willReturnCallback(function Darray
$create) { static::
assertCount(1,
$create);