You are here

protected function BotchaBaseWebTestCase::createNodeWithCommentsEnabled in BOTCHA Spam Prevention 7

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

Helper function to create a node with comments enabled.

Return value

Created node object.

8 calls to BotchaBaseWebTestCase::createNodeWithCommentsEnabled()
BotchaAdminTestCase::testBotchaAdminLinks in ./botcha.test
Testing of the BOTCHA administration links.
BotchaAdminTestCase::testBotchaPlacementCacheFlushing in ./botcha.test
Test the BOTCHA placement flushing.
BotchaAdminTestCase::testUntrustedUserPosting in ./botcha.test
BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnCommentPreview in ./botcha.test
BotchaSessionReuseAttackTestCase::testMultipleBotchaProtectedFormsOnOnePage in ./botcha.test

... See full list

File

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

Class

BotchaBaseWebTestCase
Base class for BOTCHA tests.

Code

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