You are here

protected function IntegrationTest::indexItems in Search API Solr 4.x

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

Indexes all (unindexed) items on the specified index.

Return value

int The number of successfully indexed items.

Throws

\Drupal\search_api\SearchApiException

File

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

Class

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

Namespace

Drupal\Tests\search_api_solr\Functional

Code

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