You are here

public function SearchApiWebTest::testFramework in Search API 7

Tests correct admin UI, indexing and search behavior.

We only use a single test method to avoid wasting ressources on setting up the test environment multiple times. This will be the only method called by the Simpletest framework (since the method name starts with "test"). It in turn calls other methdos that set up the environment in a certain way and then run tests on it.

File

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

Class

SearchApiWebTest
Class for testing Search API functionality via the UI.

Code

public function testFramework() {
  module_enable(array(
    'search_api_test_2',
  ));
  $this
    ->drupalLogin($this
    ->drupalCreateUser(array(
    'administer search_api',
  )));
  $this
    ->insertItems();
  $this
    ->createIndex();
  $this
    ->insertItems();
  $this
    ->createServer();
  $this
    ->checkOverview();
  $this
    ->enableIndex();
  $this
    ->searchNoResults();
  $this
    ->indexItems();
  $this
    ->searchSuccess();
  $this
    ->checkIndexingOrder();
  $this
    ->editServer();
  $this
    ->clearIndex();
  $this
    ->searchNoResults();
  $this
    ->deleteServer();
  $this
    ->disableModules();
}