protected function BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors in BOTCHA Spam Prevention 7
Same name and namespace in other branches
- 6 botcha.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
- 6.2 botcha.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
- 6.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
- 7.2 botcha.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
- 7.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
Helper function to allow comment posting for anonymous users.
1 call to BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
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[skip comment approval]' => true,
);
$this
->drupalPost('admin/people/permissions', $edit, 'Save permissions');
$this
->assertText('The changes have been saved.');
// Log admin out
$this
->drupalLogout();
}