You are here

public function FacetFacetSourceTest::testQueryTypeJugglingInvalidProcessor in Facets 8

Tests the selection of a query type.

@covers ::getQueryType @covers ::pickQueryType

File

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

Class

FacetFacetSourceTest
Class FacetFacetSourceTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

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