You are here

public function AdvancedGoogleCSESearchOn404TestCase::testAdvancedGoogleCseSearchOn404Check in Search 404 7

Test for Advanced Google CSE Search on 404 option.

File

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

Class

AdvancedGoogleCSESearchOn404TestCase
Test cases for Advanced Google CSE Search on 404.

Code

public function testAdvancedGoogleCseSearchOn404Check() {
  $this
    ->drupalLogin($this->big_user);
  $search404_do_google_cse_adv = TRUE;
  $this
    ->drupalGet('admin/config/search/search404');
  module_enable(array(
    'google_cse_adv',
  ), FALSE);
  $this
    ->assertTrue(module_exists('google_cse_adv'), 'Enable google_cse_adv module.');
  $this
    ->assertFieldByName('search404_do_google_cse_adv', $search404_do_google_cse_adv, 'Validate Advanced GoogleCSE Search build field');
  $edit = array(
    'search404_do_google_cse_adv' => $search404_do_google_cse_adv,
  );
  $this
    ->drupalPost('admin/config/search/search404', NULL, t('Save configuration'));
}