function CommentFieldsTest::testCommentFormat

7.x comment.test CommentFieldsTest::testCommentFormat()

Test that comment module works correctly with plain text format.

File

drupal-7.x/modules/comment/comment.test, line 2094
Tests for comment.module.

Class

CommentFieldsTest
Test fields on comments.

Code

function testCommentFormat() {
  // Disable text processing for comments.
  $this->drupalLogin($this->admin_user);
  $edit = array('instance[settings][text_processing]' => 0);
  $this->drupalPost('admin/structure/types/manage/article/comment/fields/comment_body', $edit, t('Save settings'));

  // Post a comment without an explicit subject.
  $this->drupalLogin($this->web_user);
  $edit = array('comment_body[und][0][value]' => $this->randomName(8));
  $this->drupalPost('node/' . $this->node->nid, $edit, t('Save'));
}