You are here

protected function BotchaBaseWebTestCase::setCommentFormValues in BOTCHA Spam Prevention 6

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

Helper function to generate a default form values array for comment forms

6 calls to BotchaBaseWebTestCase::setCommentFormValues()
BotchaAdminTestCase::testUntrustedUserPosting in ./botcha.test
BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnCommentPreview in ./botcha.test
BotchaSessionReuseAttackTestCase::testMultipleBotchaProtectedFormsOnOnePage in ./botcha.test
BotchaTestCase::assertCommentPosting in ./botcha.test
Assert function for testing if comment posting works as it should.
BotchaTestCase::testBotchaAfterCommentPreview in ./botcha.test
Test if BOTCHA is applied when previewing comments: comment preview should have BOTCHA again.

... See full list

File

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

Class

BotchaBaseWebTestCase
Base class for BOTCHA tests.

Code

protected function setCommentFormValues() {
  $edit = array(
    'subject' => 'comment_subject ' . $this
      ->randomName(32),
    'comment' => 'comment_body ' . $this
      ->randomName(256),
  );
  return $edit;
}