public function SimpleRecaptchaJavascriptTestBase::configureModule in Simple Google reCAPTCHA 8
Helper to configure the module.
We need to set up reCAPTCHA test keys to make form alteration works. Currently there's no way to set default config for testing.
See also
https://www.drupal.org/project/drupal/issues/913086
1 call to SimpleRecaptchaJavascriptTestBase::configureModule()
- SimpleRecaptchaJavascriptTestBase::setUp in tests/
src/ FunctionalJavascript/ SimpleRecaptchaJavascriptTestBase.php
File
- tests/
src/ FunctionalJavascript/ SimpleRecaptchaJavascriptTestBase.php, line 68
Class
- SimpleRecaptchaJavascriptTestBase
- JavaScripts tests for the Simple reCAPTCHA module.
Namespace
Drupal\Tests\simple_recaptcha\FunctionalJavascriptCode
public function configureModule() {
$config = [
'recaptcha_type' => 'v2',
'site_key' => '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI',
'secret_key' => '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe',
'form_ids' => 'user_login_form,user_pass,user_register_form,simple_recaptcha_test',
];
\Drupal::configFactory()
->getEditable('simple_recaptcha.config')
->setData($config)
->save();
}