summaryrefslogtreecommitdiff
path: root/modules/poll/poll.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-12-16 23:57:33 +0000
committerDries Buytaert <dries@buytaert.net>2008-12-16 23:57:33 +0000
commit574a2e47eea1bc8e2ea13240e407a32e4b728560 (patch)
tree7c124110e7e71df958fff50b2fb8e0832dd18204 /modules/poll/poll.test
parent18d22419f3da39ca4bf92f46d605a25957f311be (diff)
downloadbrdo-574a2e47eea1bc8e2ea13240e407a32e4b728560.tar.gz
brdo-574a2e47eea1bc8e2ea13240e407a32e4b728560.tar.bz2
- Patch #345866 by alexanderpas, justinrandell, Dave Reid: remove from hook_block().
Diffstat (limited to 'modules/poll/poll.test')
-rw-r--r--modules/poll/poll.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/poll/poll.test b/modules/poll/poll.test
index 83ac61778..a7030db3f 100644
--- a/modules/poll/poll.test
+++ b/modules/poll/poll.test
@@ -124,3 +124,32 @@ class PollVoteTestCase extends PollTestCase {
}
}
+class PollBlockTestCase extends DrupalWebTestCase {
+ function getInfo() {
+ return array(
+ 'name' => t('Block availability'),
+ 'description' => t('Check if the most recent poll block is available.'),
+ 'group' => t('Poll'),
+ );
+ }
+
+ function setUp() {
+ parent::setUp('poll');
+
+ // Create and login user
+ $admin_user = $this->drupalCreateUser(array('administer blocks'));
+ $this->drupalLogin($admin_user);
+ }
+
+ function testRecentBlock() {
+ // Set block title to confirm that the interface is availble.
+ $this->drupalPost('admin/build/block/configure/poll/recent', array('title' => $this->randomName(8)), t('Save block'));
+ $this->assertText(t('The block configuration has been saved.'), t('Block configuration set.'));
+
+ // Set the block to a region to confirm block is availble.
+ $edit = array();
+ $edit['poll_recent[region]'] = 'footer';
+ $this->drupalPost('admin/build/block', $edit, t('Save blocks'));
+ $this->assertText(t('The block settings have been updated.'), t('Block successfully move to footer region.'));
+ }
+}