public function UtilitiesTest::testMergeDefaultIndexThirdPartySettings in Search API Solr 8.3
Same name and namespace in other branches
- 4.x tests/src/Kernel/UtilitiesTest.php \Drupal\Tests\search_api_solr\Kernel\UtilitiesTest::testMergeDefaultIndexThirdPartySettings()
File
- tests/
src/ Kernel/ UtilitiesTest.php, line 71
Class
- UtilitiesTest
- Provides tests for various utility functions.
Namespace
Drupal\Tests\search_api_solr\KernelCode
public function testMergeDefaultIndexThirdPartySettings() {
$third_party_settings = [
'finalize' => TRUE,
'commit_before_finalize' => FALSE,
'highlighter' => [
'maxAnalyzedChars' => 51200,
'fragmenter' => 'gap',
'usePhraseHighlighter' => TRUE,
'highlightMultiTerm' => TRUE,
'preserveMulti' => FALSE,
'regex' => [
'slop' => 0.9,
'maxAnalyzedChars' => 2,
],
],
'advanced' => [
'index_prefix' => 'dummy',
],
'multilingual' => [
'limit_to_content_language' => TRUE,
'include_language_independent' => TRUE,
],
];
$this
->assertEquals([
'finalize' => TRUE,
'commit_before_finalize' => FALSE,
'commit_after_finalize' => FALSE,
'highlighter' => [
'maxAnalyzedChars' => 51200,
'fragmenter' => 'gap',
'usePhraseHighlighter' => TRUE,
'highlightMultiTerm' => TRUE,
'preserveMulti' => FALSE,
'regex' => [
'slop' => 0.9,
'pattern' => 'blank',
'maxAnalyzedChars' => 2,
],
'highlight' => [
'mergeContiguous' => FALSE,
'requireFieldMatch' => FALSE,
'snippets' => 3,
'fragsize' => 0,
],
],
'mlt' => [
'mintf' => 1,
'mindf' => 1,
'maxdf' => 0,
'maxdfpct' => 0,
'minwl' => 0,
'maxwl' => 0,
'maxqt' => 100,
'maxntp' => 2000,
'boost' => FALSE,
'interestingTerms' => 'none',
],
'advanced' => [
'index_prefix' => 'dummy',
'collection' => '',
'timezone' => '',
],
'multilingual' => [
'limit_to_content_language' => TRUE,
'include_language_independent' => TRUE,
],
], search_api_solr_merge_default_index_third_party_settings($third_party_settings));
}