You are here

public function FacetTest::testGetQueryTypeWithNoFacetSource in Facets 8

Query type with no defined facet source.

@covers ::getQueryType

File

tests/src/Kernel/Entity/FacetTest.php, line 154

Class

FacetTest
Class FacetTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testGetQueryTypeWithNoFacetSource() {
  $entity = new Facet([], 'facets_facet');
  $this
    ->expectException(Exception::class);
  $this
    ->expectExceptionMessage('No facet source defined for facet.');
  $entity
    ->getQueryType();
}