From f8083c48dbf9b88b0b82d84633ab0c07e494e15e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 25 Mar 2009 16:54:24 +0000 Subject: - Patch #296482 by mr.baileys: additional tests for the comments block. --- modules/comment/comment.test | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'modules') diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 97905cddf..2e4b6c4da 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -585,6 +585,20 @@ class CommentBlockFunctionalTest extends CommentHelperCase { $this->assertText($comment2->subject, t('Comment found in block.')); $this->assertText($comment3->comment, t('Comment found in block.')); $this->assertTrue(strpos($this->drupalGetContent(), $comment3->comment) < strpos($this->drupalGetContent(), $comment2->subject), t('Comments were ordered correctly in block.')); + + // Set the number of recent comments to show to 10. + $this->drupalLogout(); + $this->drupalLogin($this->admin_user); + $block = array( + 'comment_block_count' => 10, + ); + $this->drupalPost('admin/build/block/configure/comment/recent', $block, t('Save block')); + $this->assertText(t('The block configuration has been saved.'), t('Block saved.')); + + // Test that all three comments are shown. + $this->assertText($comment1->subject, t('Comment found in block.')); + $this->assertText($comment2->subject, t('Comment found in block.')); + $this->assertText($comment3->comment, t('Comment found in block.')); } } -- cgit v1.2.3