public function testExtendsAbstractCaptcha(): void
{ static::
assertInstanceOf(AbstractCaptcha::
class,
$this->captcha
);
} /**
* @dataProvider requestDataSupportProvider
*/
public function testIsSupported(string
$method, bool
$isActive, bool
$isSupported): void
{ $request = self::
getRequest();
$request->
setMethod($method);
$this->systemConfigService->
set('core.basicInformation.activeCaptchasV2',
[ GoogleReCaptchaV3::CAPTCHA_NAME =>
[ 'name' => GoogleReCaptchaV3::CAPTCHA_NAME,
'isActive' =>
$isActive,
],
]);
$activeCaptchaConfig =
$this->systemConfigService->
get('core.basicInformation.activeCaptchasV2'
);
static::
assertEquals($this->captcha->
supports($request,
$activeCaptchaConfig[$this->captcha->
getName()]),
$isSupported);
}