You are here

protected function IntegrationTest::countItemsOnServer in Search API 8

Counts the number of items indexed on the server for the test index.

Return value

int The number of items indexed on the server for the test index.

1 call to IntegrationTest::countItemsOnServer()
IntegrationTest::checkIndexActions in tests/src/Functional/IntegrationTest.php
Tests the various actions on the index status form.

File

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

Class

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

Namespace

Drupal\Tests\search_api\Functional

Code

protected function countItemsOnServer() {
  $key = 'search_api_test.backend.indexed.' . $this->indexId;
  return count(\Drupal::state()
    ->get($key, []));
}