protected function BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors in BOTCHA Spam Prevention 7.3
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 botcha.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
- 7.2 botcha.test \BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
Helper function to allow comment posting for anonymous users.
1 call to BotchaBaseWebTestCase::allowCommentPostingForAnonymousVisitors()
- BotchaTestCase::setUp in tests/
botcha.simpletest.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
botcha.simpletest.test, line 212 - Simpletest-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,
// @todo Abstract it.
//'1[post comments without approval]' => TRUE,
'1[skip comment approval]' => TRUE,
);
// @todo Abstract it.
//$this->drupalPost('admin/user/permissions', $edit, 'Save permissions');
$this
->drupalPost('admin/people/permissions', $edit, 'Save permissions');
$this
->assertText('The changes have been saved.');
// Log admin out
$this
->drupalLogout();
}