public function ProcessorIntegrationTest::testProcessorIntegration in Facets 8
Tests the for processors in the frontend with a 'keywords' facet.
File
- tests/
src/ Functional/ ProcessorIntegrationTest.php, line 108
Class
- ProcessorIntegrationTest
- Tests the processor functionality.
Namespace
Drupal\Tests\facets\FunctionalCode
public function testProcessorIntegration() {
$facet_name = "Vicuña";
$facet_id = "vicuna";
$this->editForm = 'admin/config/search/facets/' . $facet_id . '/edit';
$this
->createFacet($facet_name, $facet_id, 'keywords');
$this
->drupalPostForm($this->editForm, [
'facet_settings[query_operator]' => 'and',
], 'Save');
$this
->drupalGet('search-api-test-fulltext');
$this
->assertSession()
->pageTextContains('Displaying 10 search results');
$this
->assertSession()
->pageTextContains('grape');
$this
->assertSession()
->pageTextContains('orange');
$this
->assertSession()
->pageTextContains('apple');
$this
->assertSession()
->pageTextContains('strawberry');
$this
->assertSession()
->pageTextContains('banana');
$this
->checkCountLimitProcessor();
$this
->checkExcludeItems();
$this
->checkHideNonNarrowingProcessor();
$this
->checkHideActiveItems();
}