You are here

public function SearchByPageOn404TestCase::testSearchByPageOn404Check in Search 404 7

Test for search by page on 404 option.

File

./search404.test, line 445
Tests for search404.module.

Class

SearchByPageOn404TestCase
Test cases for search by page on 404.

Code

public function testSearchByPageOn404Check() {
  $this
    ->drupalLogin($this->big_user);
  $search404_do_search_by_page = TRUE;
  $this
    ->drupalGet('admin/config/search/search404');
  module_enable(array(
    'search_by_page',
  ), FALSE);
  $this
    ->assertTrue(module_exists('search_by_page'), 'Enable search_by_page module.');
  $this
    ->assertFieldByName('search404_do_search_by_page', $search404_do_search_by_page, 'Validate Search by page buid field');
  $edit = array(
    'search404_do_search_by_page' => $search404_do_search_by_page,
  );
  $this
    ->drupalPost('admin/config/search/search404', $edit, t('Save configuration'));
}