protected function CommentAlterBaseTestCase::createNodeThenPostComment in Comment Alter 7
Create a node programmatically and post a comment using the psuedo browser.
Parameters
array $original_properties: An array that gets added to the array passed to $this->drupalCreateNode().
array $comment_edit: An array that gets added to the $edit array passed to $this->drupalPost().
Return value
The created node.
See also
DrupalWebTestCase::drupalCreateNode()
postComment()
10 calls to CommentAlterBaseTestCase::createNodeThenPostComment()
- CommentAlterDeletedRevisionTestCase::testOptionsSelectSingle in ./
comment_alter.test - CommentAlterFileTestCase::testFileFieldMultiple in ./
comment_alter.test - CommentAlterFileTestCase::testFileFieldSingle in ./
comment_alter.test - CommentAlterListTextTestCase::testOptionsButtonsMultiple in ./
comment_alter.test - CommentAlterListTextTestCase::testOptionsButtonsSingle in ./
comment_alter.test
File
- ./
comment_alter.test, line 131 - Functional tests for the Comment Alter module.
Class
- CommentAlterBaseTestCase
- Parent of all the test cases for Comment Alter.
Code
protected function createNodeThenPostComment($original_properties, $comment_edit) {
$node = $this
->drupalCreateNode(array(
'type' => $this->content_type,
) + $original_properties);
$this
->postComment($node->nid, $comment_edit);
$this
->assertCommentPreview($node->nid, $comment_edit);
return $node;
}