You are here

protected function IntegrationTest::checkEntityDependencies in Search API Autocomplete 8

Verifies that the search entity's dependencies were calculated correctly.

1 call to IntegrationTest::checkEntityDependencies()
IntegrationTest::testModule in tests/src/FunctionalJavascript/IntegrationTest.php
Tests the complete functionality of the module via the UI.

File

tests/src/FunctionalJavascript/IntegrationTest.php, line 183

Class

IntegrationTest
Tests the functionality of the whole module from a user's perspective.

Namespace

Drupal\Tests\search_api_autocomplete\FunctionalJavascript

Code

protected function checkEntityDependencies() {

  /** @var \Drupal\search_api_autocomplete\SearchInterface $search */
  $search = Search::load($this->searchId);
  $expected = [
    'config' => [
      'search_api.index.autocomplete_search_index',
      "views.view.{$this->searchId}",
    ],
    'module' => [
      'search_api_autocomplete',
      'search_api_autocomplete_test',
      'views',
    ],
  ];
  $dependencies = $search
    ->getDependencies();
  ksort($dependencies);
  sort($dependencies['config']);
  sort($dependencies['module']);
  $this
    ->assertEquals($expected, $dependencies);
}