You are here

protected function SearchApiTestService::checkErrorState in Search API 7

Throws an exception if the "search_api_test_error_state" variable is set.

Throws

SearchApiException If the "search_api_test_error_state" variable is set.

5 calls to SearchApiTestService::checkErrorState()
SearchApiTestService::addIndex in tests/search_api_test.module
Implements SearchApiServiceInterface::__construct().
SearchApiTestService::deleteItems in tests/search_api_test.module
Deletes indexed items from this server.
SearchApiTestService::fieldsUpdated in tests/search_api_test.module
Implements SearchApiServiceInterface::__construct().
SearchApiTestService::indexItems in tests/search_api_test.module
Implements SearchApiServiceInterface::indexItems().
SearchApiTestService::removeIndex in tests/search_api_test.module
Implements SearchApiServiceInterface::__construct().

File

tests/search_api_test.module, line 373
Test functions and classes for testing the Search API.

Class

SearchApiTestService
Test service class.

Code

protected function checkErrorState() {
  if (variable_get('search_api_test_error_state', FALSE)) {
    throw new SearchApiException();
  }
}