You are here

protected function SearchApiWebTest::editServer in Search API 7

Tests whether editing the server works correctly.

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

File

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

Class

SearchApiWebTest
Class for testing Search API functionality via the UI.

Code

protected function editServer() {
  $values = array(
    'name' => 'test-name-foo',
    'description' => 'test-description-bar',
    'options[form][test]' => 'test-test-baz',
  );
  $this
    ->drupalPost("admin/config/search/search_api/server/{$this->server_id}/edit", $values, t('Save settings'));
  $this
    ->assertText(t('The search server was successfully edited.'));
  $this
    ->assertText('test-name-foo', 'Name changed.');
  $this
    ->assertText('test-description-bar', 'Description changed.');
  $this
    ->assertText('test-test-baz', 'Service options changed.');
}