Skip to content

Commit a4e30bf

Browse files
committed
ACP2E-99: "Search Synonyms" no longer works when value is added in "Minimum Terms to Match"
1 parent 28e982f commit a4e30bf

File tree

1 file changed

+8
-5
lines changed
  • app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/Index

1 file changed

+8
-5
lines changed

app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/Index/BuilderTest.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public function testBuildWithoutSynonymsProvided(string $locale)
150150
$analysisFilters,
151151
'Analysis filters must not contain synonyms when they are not defined'
152152
);
153-
$this->assertNotContains($synonymsFilterName,
153+
$this->assertNotContains(
154+
$synonymsFilterName,
154155
$prefixSearchAnalyzerFilters,
155156
'The prefix_search analyzer must not include synonyms filter when it is not present'
156157
);
@@ -180,8 +181,8 @@ public function testBuildWithProvidedSynonyms(string $locale)
180181
];
181182

182183
$expectedFilter = [
183-
'type' => 'synonym_graph',
184-
'synonyms' => $synonyms
184+
'type' => 'synonym_graph',
185+
'synonyms' => $synonyms
185186
];
186187

187188
$this->localeResolver->expects($this->once())
@@ -208,11 +209,13 @@ public function testBuildWithProvidedSynonyms(string $locale)
208209
$analysisFilters,
209210
'Analysis synonyms filter must match the expected result'
210211
);
211-
$this->assertContains($synonymsFilterName,
212+
$this->assertContains(
213+
$synonymsFilterName,
212214
$prefixSearchAnalyzerFilters,
213215
'The prefix_search analyzer must include synonyms filter'
214216
);
215-
$this->assertContains($synonymsFilterName,
217+
$this->assertContains(
218+
$synonymsFilterName,
216219
$skuPrefixSearchAnalyzerFilters,
217220
'The sku_prefix_search analyzer must include synonyms filter'
218221
);

0 commit comments

Comments
 (0)