Commit f8083c48 authored by Dries's avatar Dries

- Patch #296482 by mr.baileys: additional tests for the comments block.

parent 617ccc1d
......@@ -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.'));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment