You are here

protected function CaptchaWebTestBase::allowCommentPostingForAnonymousVisitors in CAPTCHA 8

Helper function to allow comment posting for anonymous users.

1 call to CaptchaWebTestBase::allowCommentPostingForAnonymousVisitors()
CaptchaSessionReuseAttackTestCase::testMultipleCaptchaProtectedFormsOnOnePage in tests/src/Functional/CaptchaSessionReuseAttackTestCase.php
Test multiple captcha widgets on single page.

File

tests/src/Functional/CaptchaWebTestBase.php, line 256

Class

CaptchaWebTestBase
Base class for CAPTCHA tests.

Namespace

Drupal\Tests\captcha\Functional

Code

protected function allowCommentPostingForAnonymousVisitors() {

  // Enable anonymous comments.
  user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, [
    'access comments',
    'post comments',
    'skip comment approval',
  ]);
}