summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-09-19 03:11:53 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-09-19 03:11:53 +0000
commit804b313a85780a0c3403cea5caae7bb6977352ec (patch)
tree22fed4437820db3d6870969dcd3f250cfe707296 /modules
parentc32c0f517fca61b8e5e86e1703769a248a722a77 (diff)
downloadbrdo-804b313a85780a0c3403cea5caae7bb6977352ec.tar.gz
brdo-804b313a85780a0c3403cea5caae7bb6977352ec.tar.bz2
#296486 by lyricnz and boombatower: Tests for viewing an individual comment.
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/comment.test14
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/comment/comment.test b/modules/comment/comment.test
index e3350e613..251ceeb73 100644
--- a/modules/comment/comment.test
+++ b/modules/comment/comment.test
@@ -54,7 +54,8 @@ class CommentHelperCase extends DrupalWebTestCase {
// Get comment.
if ($contact !== TRUE) { // If true then attempting to find error message.
- $this->assertText($subject, 'Comment posted.');
+ $this->assertText($subject, 'Comment subject posted.');
+ $this->assertText($comment, 'Comment body posted.');
$this->assertTrue((!empty($match) && !empty($match[1])), t('Comment id found.'));
}
@@ -266,11 +267,20 @@ class CommentInterfaceTest extends CommentHelperCase {
// Create comment that requires preview.
$this->drupalLogin($this->web_user);
- $comment = $this->postComment($this->node, $this->randomName(), $this->randomName());
+ $subject_text = $this->randomName();
+ $comment_text = $this->randomName();
+ $comment = $this->postComment($this->node, $subject_text, $comment_text);
$this->assertTrue($this->commentExists($comment), t('Comment found.'));
+ // Check comment display.
+ $this->drupalGet('node/' . $this->node->nid . '/' . $comment->id);
+ $this->assertText($subject_text, t('Individual comment subject found.'));
+ $this->assertText($comment_text, t('Individual comment body found.'));
+
// Reply to comment.
$this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
+ $this->assertText($subject_text, t('Individual comment-reply subject found.'));
+ $this->assertText($comment_text, t('Individual comment-reply body found.'));
$reply = $this->postComment(NULL, $this->randomName(), $this->randomName());
$this->assertTrue($this->commentExists($reply, TRUE), t('Reply found.'));