You are here

protected function BackendTest::checkIndexWithoutFields in Search API 8

Checks the correct handling of an index without fields.

Return value

\Drupal\search_api\IndexInterface The created test index.

Overrides BackendTestBase::checkIndexWithoutFields

File

modules/search_api_db/tests/src/Kernel/BackendTest.php, line 856

Class

BackendTest
Tests index and search capabilities using the Database search backend.

Namespace

Drupal\Tests\search_api_db\Kernel

Code

protected function checkIndexWithoutFields() {
  $index = parent::checkIndexWithoutFields();
  $expected = [
    'search_api_datasource',
    'search_api_language',
  ];
  $db_info = $this
    ->getIndexDbInfo($index
    ->id());
  $info_fields = array_keys($db_info['field_tables']);
  sort($info_fields);
  $this
    ->assertEquals($expected, $info_fields);
  return $index;
}