function SearchBlockTestCase::testSearchFormBlock

File

modules/search/search.test, line 612

Class

SearchBlockTestCase
Tests the rendering of the search block.

Code

function testSearchFormBlock() {
    // Set block title to confirm that the interface is available.
    $this->drupalPost('admin/structure/block/manage/search/form/configure', array(
        'title' => $this->randomName(8),
    ), t('Save block'));
    $this->assertText(t('The block configuration has been saved.'), 'Block configuration set.');
    // Set the block to a region to confirm block is available.
    $edit = array();
    $edit['blocks[search_form][region]'] = 'footer';
    $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
    $this->assertText(t('The block settings have been updated.'), 'Block successfully move to footer region.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.