Skip to content

Commit 9b3fe8c

Browse files
committed
collationFixedCriterion
1 parent 21c4c83 commit 9b3fe8c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php

+13-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,20 @@ public function testIndexingRemoteId(Criterion $criterion): void
5555

5656
$contentId = self::$contentIdByRemoteIdIndex[$remoteId];
5757

58+
// ensure correct collation for comparison
59+
$collationFixedCriterion = new Criterion\RemoteId([
60+
new Criterion\LogicalAnd([
61+
new Criterion\Comparison(
62+
'remote_id',
63+
Criterion\Operator::EQ,
64+
$remoteId . " COLLATE utf8mb4_unicode_ci"
65+
)
66+
])
67+
]);
68+
5869
// test searching using both Content & Location remote IDs for both Content items
5970
$query = new Query();
60-
$query->filter = $criterion;
71+
$query->filter = $collationFixedCriterion;
6172
$result = $searchService->findContent($query);
6273
self::assertSame(
6374
1,
@@ -67,7 +78,7 @@ public function testIndexingRemoteId(Criterion $criterion): void
6778
self::assertSame($contentId, $result->searchHits[0]->valueObject->id);
6879

6980
$query = new LocationQuery();
70-
$query->filter = $criterion;
81+
$query->filter = $collationFixedCriterion;
7182
$result = $searchService->findLocations($query);
7283
self::assertSame(
7384
1,

0 commit comments

Comments
 (0)