public function HighlightTest::postprocessSearchResultsHighlightPartialDataProvider in Search API 8
Provides test data sets for testPostprocessSearchResultsHighlightPartial().
Return value
array[] An array of argument arrays for testPostprocessSearchResultsHighlightPartial().
See also
\Drupal\Tests\search_api\Unit\Processor\HighlightTest::testPostprocessSearchResultsHighlightPartial()
File
- tests/
src/ Unit/ Processor/ HighlightTest.php, line 359
Class
- HighlightTest
- Tests the "Highlight" processor.
Namespace
Drupal\Tests\search_api\Unit\ProcessorCode
public function postprocessSearchResultsHighlightPartialDataProvider() {
$data_sets = [
'normal' => [
'Some longwordtoshowpartialmatching value',
'partial',
'Some longwordtoshow<strong>partial</strong>matching value',
],
];
// Test multi-byte support only if this PHP installation actually contains
// the necessary function. Otherwise, we can't really be blamed for not
// supporting them.
if (function_exists('mb_stripos')) {
$data_sets['multi-byte'] = [
'Alle Angaben ohne Gewähr.',
'Ähr',
'Alle Angaben ohne Gew<strong>ähr</strong>.',
];
}
return $data_sets;
}