protected function CaptchaWebTestBase::getNodeFormValues in CAPTCHA 8
Helper function to generate a form values array for node forms.
2 calls to CaptchaWebTestBase::getNodeFormValues()
- CaptchaSessionReuseAttackTestCase::testCaptchaSessionReuseAttackDetectionOnNodeForm in tests/
src/ Functional/ CaptchaSessionReuseAttackTestCase.php - Test captcha attach detection on node form.
- CaptchaTest::testCaptchaSessionReuseOnNodeForms in tests/
src/ Functional/ CaptchaTest.php - Test if the CAPTCHA session ID is reused when previewing nodes.
File
- tests/
src/ Functional/ CaptchaWebTestBase.php, line 168
Class
- CaptchaWebTestBase
- Base class for CAPTCHA tests.
Namespace
Drupal\Tests\captcha\FunctionalCode
protected function getNodeFormValues() {
$edit = [
'title[0][value]' => 'node_title ' . $this
->randomMachineName(32),
'body[0][value]' => 'node_body ' . $this
->randomMachineName(256),
];
return $edit;
}