$this->systemConfigService->
set('core.basicInformation.activeCaptchasV2',
[ GoogleReCaptchaV2::CAPTCHA_NAME =>
[ 'name' => GoogleReCaptchaV2::CAPTCHA_NAME,
'isActive' => true,
'config' =>
[ 'secretKey' =>
$secretKey,
],
],
]);
$activeCaptchaConfig =
$this->systemConfigService->
get('core.basicInformation.activeCaptchasV2'
);
$captcha =
new GoogleReCaptchaV2($client);
static::
assertEquals($captcha->
isValid($request,
$activeCaptchaConfig[$captcha->
getName()]),
$shouldBeValid);
} public static function requestDataIsValidProvider(): array
{ return [ 'request with no captcha input' =>
[ self::
getRequest(),
new MockHandler(),
self::IS_INVALID,