protected function CaptchaWebTestBase::getCommentFormValues in CAPTCHA 8
Helper function to generate a form values array for comment forms.
5 calls to CaptchaWebTestBase::getCommentFormValues()
- CaptchaAdminTest::testUntrustedUserPosting in tests/
src/ Functional/ CaptchaAdminTest.php - Test untrusted user posting.
- CaptchaSessionReuseAttackTestCase::testCaptchaSessionReuseAttackDetectionOnCommentPreview in tests/
src/ Functional/ CaptchaSessionReuseAttackTestCase.php - Test captcha attack detection on comment form.
- CaptchaSessionReuseAttackTestCase::testMultipleCaptchaProtectedFormsOnOnePage in tests/
src/ Functional/ CaptchaSessionReuseAttackTestCase.php - Test multiple captcha widgets on single page.
- CaptchaTest::assertCommentPosting in tests/
src/ Functional/ CaptchaTest.php - Assert function for testing if comment posting works as it should.
- CaptchaTest::testCaptchaDescriptionAfterCommentPreview in tests/
src/ Functional/ CaptchaTest.php - Test if the CAPTCHA description is only shown with challenge widgets.
File
- tests/
src/ Functional/ CaptchaWebTestBase.php, line 156
Class
- CaptchaWebTestBase
- Base class for CAPTCHA tests.
Namespace
Drupal\Tests\captcha\FunctionalCode
protected function getCommentFormValues() {
$edit = [
'subject[0][value]' => 'comment_subject ' . $this
->randomMachineName(32),
'comment_body[0][value]' => 'comment_body ' . $this
->randomMachineName(256),
];
return $edit;
}