You are here

public function SearchApiElasticsearchElasticaTest::testSupportsFeature in Search API Elasticsearch 7

testSupportsFeature

@access public

Return value

void

File

modules/elastica/tests/phpunit/SearchApiElasticsearchElasticaTest.php, line 116
Contains tests for SearchApiElasticsearchElastica.

Class

SearchApiElasticsearchElasticaTest
@file Contains tests for SearchApiElasticsearchElastica.

Code

public function testSupportsFeature() {
  $features = array(
    'search_api_autocomplete',
    'search_api_data_type_location',
    'search_api_facets',
    'search_api_facets_operator_or',
    'search_api_mlt',
    'search_api_service_extra',
    'search_api_test_fail',
  );
  foreach ($features as $feature) {
    if ($feature === 'search_api_test_fail') {
      $this
        ->assertFalse($this->_client
        ->supportsFeature($feature));
    }
    else {
      $this
        ->assertTrue($this->_client
        ->supportsFeature($feature));
    }
  }
}