You are here

protected function BotchaBaseWebTestCase::createNodeWithCommentsEnabled in BOTCHA Spam Prevention 7.2

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 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.

2 calls to BotchaBaseWebTestCase::createNodeWithCommentsEnabled()
BotchaAdminTestCase::testBotchaAdminLinks in ./botcha.test
Testing of the BOTCHA administration links.
BotchaBaseWebTestCase::getForm in ./botcha.test
Get one of predefined forms. Used to unify the process of testing.

File

./botcha.test, line 135
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;
}