You are here

protected function ViewsTest::setUp in Search API Autocomplete 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/ViewsTest.php, line 39

Class

ViewsTest
Tests Views integration of the Autocomplete module.

Namespace

Drupal\Tests\search_api_autocomplete\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('entity_test_mulrev_changed');
  $this
    ->installEntitySchema('search_api_task');
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('search_api', [
    'search_api_item',
  ]);
  $this
    ->installConfig('search_api');
  $this
    ->installConfig('search_api_test_example_content');

  // Do not use a batch for tracking the initial items after creating an
  // index when running the tests via the GUI. Otherwise, it seems Drupal's
  // Batch API gets confused and the test fails.
  if (php_sapi_name() != 'cli') {
    \Drupal::state()
      ->set('search_api_use_tracking_batch', FALSE);
  }
}