You are here

public function GoogleCSESearchOn404TestCase::testGoogleCseSearchOn404Check in Search 404 7

Test for GoogleCSE search on 404 option.

File

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

Class

GoogleCSESearchOn404TestCase
Test cases for Google CSE Search on 404.

Code

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