You are here

protected function IntegrationTest::getIndex in Search API 8

Retrieves test index.

Parameters

bool $reset: (optional) If TRUE, reset the entity cache before loading.

Return value

\Drupal\search_api\IndexInterface The test index.

10 calls to IntegrationTest::getIndex()
IntegrationTest::addFieldsToIndex in tests/src/Functional/IntegrationTest.php
Tests whether adding fields to the index works correctly.
IntegrationTest::changeIndexDatasource in tests/src/Functional/IntegrationTest.php
Changes the index's datasources and checks if it reacts correctly.
IntegrationTest::checkIndexActions in tests/src/Functional/IntegrationTest.php
Tests the various actions on the index status form.
IntegrationTest::checkUnsavedChanges in tests/src/Functional/IntegrationTest.php
Tests whether unsaved fields changes work correctly.
IntegrationTest::configureFilter in tests/src/Functional/IntegrationTest.php
Tests that configuring a processor works.

... See full list

File

tests/src/Functional/IntegrationTest.php, line 1606

Class

IntegrationTest
Tests the overall functionality of the Search API framework and admin UI.

Namespace

Drupal\Tests\search_api\Functional

Code

protected function getIndex($reset = FALSE) {
  if ($reset) {
    $this->indexStorage
      ->resetCache([
      $this->indexId,
    ]);
  }
  return $this->indexStorage
    ->load($this->indexId);
}