protected function SearchApiSolrTest::regressionTest2469547 in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 tests/src/Kernel/SearchApiSolrTest.php \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrTest::regressionTest2469547()
- 8 tests/src/Kernel/SearchApiSolrTest.php \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrTest::regressionTest2469547()
- 8.2 tests/src/Kernel/SearchApiSolrTest.php \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrTest::regressionTest2469547()
Regression tests for #2469547.
File
- tests/
src/ Kernel/ SearchApiSolrTest.php, line 134
Class
- SearchApiSolrTest
- Tests index and search capabilities using the Solr search backend.
Namespace
Drupal\Tests\search_api_solr\KernelCode
protected function regressionTest2469547() {
return;
// @todo
// @codingStandardsIgnoreStart
$query = $this
->buildSearch();
$facets = [];
$facets['body'] = [
'field' => 'body',
'limit' => 0,
'min_count' => 1,
'missing' => FALSE,
];
$query
->setOption('search_api_facets', $facets);
$query
->addCondition('id', 5, '<>');
$query
->range(0, 0);
$results = $query
->execute();
$expected = $this
->getExpectedFacetsOfRegressionTest2469547();
// We can't guarantee the order of returned facets, since "bar" and "foobar"
// both occur once, so we have to manually sort the returned facets first.
$facets = $results
->getExtraData('search_api_facets', [])['body'];
usort($facets, [
$this,
'facetCompare',
]);
$this
->assertEquals($expected, $facets, 'Correct facets were returned for a fulltext field.');
// @codingStandardsIgnoreEnd
}