function GoogleApplianceSearchBlockAvailability::testCase_BlockAdmin in Google Search Appliance 7
File
- testing/
google_appliance.test, line 389 - Implements automated simpletest routines for integration testing of the Google Appliance module.
Class
- GoogleApplianceSearchBlockAvailability
- Search Block availability: test the interaction for appearance of the block search form via blocks administration, then be sure submission of that form redirect to the results page.
Code
function testCase_BlockAdmin() {
// set block title to confirm that the interface is availble.
$this
->drupalPost('admin/structure/block/manage/google_appliance/ga_block_search_form/configure', array(
'title' => $this
->randomName(8),
), t('Save block'));
// confirm block settings update
$this
->assertText(t('The block configuration has been saved.'), t('<b>{MTP:2.3.2.5}</b> Block configuration set (successful interaction: block title set).'));
// Set the block to a region to confirm block is availble.
$edit = array();
$edit['blocks[google_appliance_ga_block_search_form][region]'] = 'footer';
$this
->drupalPost('admin/structure/block', $edit, t('Save blocks'));
$this
->assertText(t('The block settings have been updated.'), t('<b>{MTP:2.3.2.6}</b> Block successfully moved to footer region (successful interaction: block region assignment).'));
}