diff --git a/src/Tests/IntegrationTest.php b/src/Tests/IntegrationTest.php index 4e787cb..6a03faf 100644 --- a/src/Tests/IntegrationTest.php +++ b/src/Tests/IntegrationTest.php @@ -463,18 +463,9 @@ class IntegrationTest extends WebTestBase { $this->createBlock('type'); $this->createBlock('keywords'); - $this->drupalGet('admin/config/search/facets/keywords/edit'); - $edit = [ - 'widget' => 'links', - 'widget_configs[show_numbers]' => '1', - ]; - $this->drupalPostForm(NULL, $edit, $this->t('Save')); - $this->drupalGet('admin/config/search/facets/type/edit'); - $edit = [ - 'widget' => 'links', - 'widget_configs[show_numbers]' => '1', - ]; - $this->drupalPostForm(NULL, $edit, $this->t('Save')); + $edit = ['widget' => 'links', 'widget_configs[show_numbers]' => '1']; + $this->drupalPostForm('admin/config/search/facets/keywords/edit', $edit, $this->t('Save')); + $this->drupalPostForm('admin/config/search/facets/type/edit', $edit, $this->t('Save')); $this->drupalGet('search-api-test-fulltext'); $this->assertText('Displaying 5 search results'); diff --git a/src/Tests/ProcessorIntegrationTest.php b/src/Tests/ProcessorIntegrationTest.php index def41cf..ceff798 100644 --- a/src/Tests/ProcessorIntegrationTest.php +++ b/src/Tests/ProcessorIntegrationTest.php @@ -309,11 +309,11 @@ class ProcessorIntegrationTest extends WebTestBase { protected function checkHideNonNarrowingProcessor() { $this->drupalGet('search-api-test-fulltext'); $this->assertText('Displaying 10 search results'); - $this->assertLink('grape'); + $this->assertLink('apple'); - $this->clickLink('grape'); - $this->assertText('Displaying 6 search results'); - $this->assertLink('orange'); + $this->clickLink('apple'); + $this->assertText('Displaying 4 search results'); + $this->assertLink('grape'); $form = [ 'facet_settings[hide_non_narrowing_result_processor][status]' => TRUE, @@ -322,11 +322,11 @@ class ProcessorIntegrationTest extends WebTestBase { $this->drupalGet('search-api-test-fulltext'); $this->assertText('Displaying 10 search results'); - $this->assertLink('grape'); + $this->assertLink('apple'); - $this->clickLink('grape'); - $this->assertText('Displaying 6 search results'); - $this->assertNoLink('orange'); + $this->clickLink('apple'); + $this->assertText('Displaying 4 search results'); + $this->assertNoLink('grape'); $form = [ 'facet_settings[hide_non_narrowing_result_processor][status]' => FALSE, diff --git a/tests/src/Unit/Plugin/query_type/SearchApiStringTest.php b/tests/src/Unit/Plugin/query_type/SearchApiStringTest.php index cc927c1..bec7fea 100644 --- a/tests/src/Unit/Plugin/query_type/SearchApiStringTest.php +++ b/tests/src/Unit/Plugin/query_type/SearchApiStringTest.php @@ -63,16 +63,6 @@ class SearchApiStringTest extends UnitTestCase { ['query_operator' => 'OR'], 'facets_facet' ); - - $facet->setUnfilteredResults([ - 'field_animal' => [ - ['count' => 9, 'filter' => 'unicorn'], - ['count' => 3, 'filter' => 'badger'], - ['count' => 7, 'filter' => 'narwhal'], - ['count' => 5, 'filter' => 'mushroom'], - ], - ]); - $facet->setFieldIdentifier('field_animal'); $original_results = [