diff options
Diffstat (limited to 'modules/search/search.test')
-rw-r--r-- | modules/search/search.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/search/search.test b/modules/search/search.test index a99d1e00d..c7f9ecc77 100644 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -333,3 +333,33 @@ class SearchRankingTestCase extends DrupalWebTestCase { } } } + +class SearchBlockTestCase extends DrupalWebTestCase { + function getInfo() { + return array( + 'name' => t('Block availability'), + 'description' => t('Check if the search form block is available.'), + 'group' => t('Search'), + ); + } + + function setUp() { + parent::setUp('search'); + + // Create and login user + $admin_user = $this->drupalCreateUser(array('administer blocks')); + $this->drupalLogin($admin_user); + } + + function testSearchFormBlock() { + // Set block title to confirm that the interface is availble. + $this->drupalPost('admin/build/block/configure/search/form', 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['search_form[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.')); + } +} |