You are here

protected function CaptchaBaseWebTestCase::getNodeFormValues in CAPTCHA 7

Same name and namespace in other branches
  1. 6.2 captcha.test \CaptchaBaseWebTestCase::getNodeFormValues()

Helper function to generate a form values array for node forms

2 calls to CaptchaBaseWebTestCase::getNodeFormValues()
CaptchaSessionReuseAttackTestCase::testCaptchaSessionReuseAttackDetectionOnNodeForm in ./captcha.test
CaptchaTestCase::testCaptchaSessionReuseOnNodeForms in ./captcha.test
Test if the CAPTCHA session ID is reused when previewing nodes: node preview after correct response should not show CAPTCHA anymore. The preview functionality of comments and nodes works slightly different under the hood. CAPTCHA module should be able…

File

./captcha.test, line 153
Tests for CAPTCHA module.

Class

CaptchaBaseWebTestCase
Base class for CAPTCHA tests.

Code

protected function getNodeFormValues() {
  $edit = array(
    'title' => 'node_title ' . $this
      ->randomName(32),
    'body[' . LANGUAGE_NONE . '][0][value]' => 'node_body ' . $this
      ->randomName(256),
  );
  return $edit;
}