You are here

protected function BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors in BOTCHA Spam Prevention 6

Same name and namespace in other branches
  1. 6.2 botcha.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
  2. 6.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
  3. 7 botcha.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
  4. 7.2 botcha.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
  5. 7.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()

Helper function to allow comment posting for anonymous users.

1 call to BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
BotchaSessionReuseAttackTestCase::testMultipleBotchaProtectedFormsOnOnePage in ./botcha.test

File

./botcha.test, line 203
Tests for BOTCHA module.

Class

BotchaBaseWebTestCase
Base class for BOTCHA tests.

Code

protected function allowCommentPostingForAnonymousVisitors() {

  // Log in as admin.
  $this
    ->drupalLogin($this->admin_user);

  // Post user permissions form
  $edit = array(
    '1[access comments]' => true,
    '1[post comments]' => true,
    '1[post comments without approval]' => true,
  );
  $this
    ->drupalPost('admin/user/permissions', $edit, 'Save permissions');
  $this
    ->assertText('The changes have been saved.');

  // Log admin out
  $this
    ->drupalLogout();
}