public function FacetFacetSourceTest::testQueryTypeJugglingInvalidWidget in Facets 8
Tests the selection of a query type.
@covers ::getQueryType @covers ::pickQueryType
File
- tests/
src/ Kernel/ Entity/ FacetFacetSourceTest.php, line 141
Class
- FacetFacetSourceTest
- Class FacetFacetSourceTest.
Namespace
Drupal\Tests\facets\Kernel\EntityCode
public function testQueryTypeJugglingInvalidWidget() {
$entity = new Facet([], 'facets_facet');
$entity
->setWidget('widget_invalid_qt');
$entity
->setFacetSourceId('search_api:views_page__search_api_test_view__page_1');
$entity
->setFieldIdentifier('name');
$this
->expectException(InvalidQueryTypeException::class);
$entity
->getQueryType();
}