You are here

public function FacetFacetSourceTest::testInvalidQueryType in Facets 8

Tests invalid query type.

The error here is triggered because no field id is set.

@covers ::getQueryType @covers ::getFacetSource

File

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

Class

FacetFacetSourceTest
Class FacetFacetSourceTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testInvalidQueryType() {
  $entity = new Facet([], 'facets_facet');
  $entity
    ->setWidget('links');
  $entity
    ->setFacetSourceId('search_api:views_page__search_api_test_view__page_1');
  $this
    ->expectException(InvalidQueryTypeException::class);
  $entity
    ->getQueryType();
}