You are here

protected function ViewsTest::indexItems in Search API Solr 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/ViewsTest.php \Drupal\Tests\search_api_solr\Functional\ViewsTest::indexItems()
  2. 8 tests/src/Functional/ViewsTest.php \Drupal\Tests\search_api_solr\Functional\ViewsTest::indexItems()
  3. 4.x tests/src/Functional/ViewsTest.php \Drupal\Tests\search_api_solr\Functional\ViewsTest::indexItems()

Indexes all (unindexed) items on the specified index.

Parameters

string $index_id: The ID of the index on which items should be indexed.

Return value

int The number of successfully indexed items.

Throws

\Drupal\search_api\SearchApiException

Overrides ExampleContentTrait::indexItems

1 call to ViewsTest::indexItems()
ViewsTest::setUp in tests/src/Functional/ViewsTest.php

File

tests/src/Functional/ViewsTest.php, line 85

Class

ViewsTest
Tests the Views integration of the Search API.

Namespace

Drupal\Tests\search_api_solr\Functional

Code

protected function indexItems($index_id) {
  $index_status = parent::indexItems($index_id);
  $index = Index::load($index_id);
  $this
    ->ensureCommit($index
    ->getServerInstance());
  return $index_status;
}