You are here

protected function IntegrationTest::indexItems in Search API Solr 8.2

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. 4.x 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

Overrides IntegrationTest::indexItems

File

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

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
    ->getServerInstance());
  return $index_status;
}