function EntityTranslationCommentTestCase::postComment in Entity Translation 7
Add a comment for the given node.
Parameters
$node: The node for which to add the comment.
$comment_body: The comment body text.
$language: The comment language.
1 call to EntityTranslationCommentTestCase::postComment()
- EntityTranslationCommentTestCase::testCommentLanguageFiltering in tests/
entity_translation.test - Test comment filtering by language.
File
- tests/
entity_translation.test, line 444 - Tests for Entity translation module.
Class
- EntityTranslationCommentTestCase
- Basic tests for comment related things.
Code
function postComment($node, $comment_body, $language) {
$edit = array();
$edit['comment_body[' . LANGUAGE_NONE . '][0][value]'] = $comment_body;
$this
->post($language, 'comment/reply/' . $node->nid, $edit, t('Save'));
}