You are here

public function FacetFacetSourceTest::testQueryTypeJugglingInvalidCombo in Facets 8

Tests the selection of a query type.

@covers ::getQueryType @covers ::pickQueryType

File

tests/src/Kernel/Entity/FacetFacetSourceTest.php, line 178

Class

FacetFacetSourceTest
Class FacetFacetSourceTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testQueryTypeJugglingInvalidCombo() {
  $entity = new Facet([], 'facets_facet');
  $entity
    ->setWidget('widget_date_qt');
  $entity
    ->setFacetSourceId('search_api:views_page__search_api_test_view__page_1');
  $entity
    ->setFieldIdentifier('name');
  $processor = [
    'processor_id' => 'test_pre_query',
    'weights' => [],
    'settings' => [],
  ];
  $entity
    ->addProcessor($processor);
  $this
    ->expectException(InvalidQueryTypeException::class);
  $entity
    ->getQueryType();
}