You are here

protected function SearchApiWebTest::enableIndex in Search API 7

Moves the index onto the server and enables it.

1 call to SearchApiWebTest::enableIndex()
SearchApiWebTest::testFramework in ./search_api.test
Tests correct admin UI, indexing and search behavior.

File

./search_api.test, line 334
Contains the SearchApiWebTest and the SearchApiUnitTest classes.

Class

SearchApiWebTest
Class for testing Search API functionality via the UI.

Code

protected function enableIndex() {
  $values = array(
    'server' => $this->server_id,
  );
  $this
    ->drupalPost("admin/config/search/search_api/index/{$this->index_id}/edit", $values, t('Save settings'));
  $this
    ->assertText(t('The search index was successfully edited.'));
  $this
    ->assertText('Search API test server', 'Server displayed.');
  $this
    ->clickLink(t('enable'));
  $this
    ->assertText(t('The index was successfully enabled.'));
}