You are here

protected function SearchApiBrowserTestBase::executeTasks in Search API 8

Executes all pending Search API tasks.

1 call to SearchApiBrowserTestBase::executeTasks()
IntegrationTest::changeIndexDatasource in tests/src/Functional/IntegrationTest.php
Changes the index's datasources and checks if it reacts correctly.

File

tests/src/Functional/SearchApiBrowserTestBase.php, line 206

Class

SearchApiBrowserTestBase
Provides the base class for web tests for Search API.

Namespace

Drupal\Tests\search_api\Functional

Code

protected function executeTasks() {
  $task_manager = \Drupal::getContainer()
    ->get('search_api.task_manager');
  $task_manager
    ->executeAllTasks();
  $this
    ->assertEquals(0, $task_manager
    ->getTasksCount(), 'No more pending tasks.');
}