You are here

protected function CaptchaBaseWebTestCase::createNodeWithCommentsEnabled in CAPTCHA 7

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

Helper function to create a node with comments enabled.

Return value

Created node object.

6 calls to CaptchaBaseWebTestCase::createNodeWithCommentsEnabled()
CaptchaAdminTestCase::testCaptchAdminLinks in ./captcha.test
Testing of the CAPTCHA administration links.
CaptchaAdminTestCase::testUntrustedUserPosting in ./captcha.test
CaptchaSessionReuseAttackTestCase::testCaptchaSessionReuseAttackDetectionOnCommentPreview in ./captcha.test
CaptchaSessionReuseAttackTestCase::testMultipleCaptchaProtectedFormsOnOnePage in ./captcha.test
CaptchaTestCase::assertCommentPosting in ./captcha.test
Assert function for testing if comment posting works as it should.

... See full list

File

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

Class

CaptchaBaseWebTestCase
Base class for CAPTCHA tests.

Code

protected function createNodeWithCommentsEnabled($type = 'page') {
  $node_settings = array(
    'type' => $type,
    'comment' => COMMENT_NODE_OPEN,
  );
  $node = $this
    ->drupalCreateNode($node_settings);
  return $node;
}