'/store-api/account/recovery-password',
[ 'email' => 'foo-test@test.de',
'storefrontUrl' =>
$domainUrlTest['expectDomain'
],
] );
static::
assertEquals(200,
$this->browser->
getResponse()->
getStatusCode());
/** @var CustomerAccountRecoverRequestEvent $caughtEvent */
static::
assertInstanceOf(CustomerAccountRecoverRequestEvent::
class,
$caughtEvent);
static::
assertStringStartsWith('http://my-evil-page/account/',
$caughtEvent->
getResetUrl());
} public function testSendMailWithChangedUrl(): void
{ $this->
createCustomer('foo-test@test.de'
);
$systemConfigService =
$this->
getContainer()->
get(SystemConfigService::
class);
$systemConfigService->
set('core.loginRegistration.pwdRecoverUrl', '/test/rec/password/%%RECOVERHASH%%"'
);
/** @var EventDispatcherInterface $dispatcher */
$dispatcher =
$this->
getContainer()->
get('event_dispatcher'
);