Skip to content

Commit

Permalink
Adopt test case to ignore sorting of the documents
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Oct 16, 2024
1 parent d824b66 commit fd08574
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/seal/src/Testing/AbstractSearcherTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -938,16 +938,22 @@ public function testNotInCondition(): void
$search->addIndex(TestingHelper::INDEX_COMPLEX);
$search->addFilter(new Condition\NotInCondition('tags', ['UI']));

$expectedDocumentsVariant = [
$expectedDocumentsVariantA = [
$documents[2],
$documents[3],
];

$expectedDocumentsVariantB = [
$documents[3],
$documents[2],
];

$loadedDocuments = [...$search->getResult()];
$this->assertCount(2, $loadedDocuments);

$this->assertTrue(
$expectedDocumentsVariant === $loadedDocuments,
$expectedDocumentsVariantA === $loadedDocuments
|| $expectedDocumentsVariantB === $loadedDocuments,
'Not correct documents where found.',
);

Expand Down

0 comments on commit fd08574

Please sign in to comment.