You are here

protected function BotchaBaseWebTestCase::createNodeWithCommentsEnabled in BOTCHA Spam Prevention 7.3

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.2 botcha.test \BotchaBaseWebTestCase::createNodeWithCommentsEnabled()

Helper function to create a node with comments enabled.

Return value

Created node object.

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

File

tests/botcha.simpletest.test, line 125
Simpletest-tests for BOTCHA module.

Class

BotchaBaseWebTestCase
Base class for BOTCHA tests.

Code

protected function createNodeWithCommentsEnabled($type = 'page') {
  $node_settings = array(
    'type' => $type,
    // @todo Abstract it.

    //'comment' => COMMENT_NODE_READ_WRITE,
    'comment' => COMMENT_NODE_OPEN,
  );
  $node = $this
    ->drupalCreateNode($node_settings);
  return $node;
}