Skip to content

Commit

Permalink
fix: sorting of the codeception results
Browse files Browse the repository at this point in the history
  • Loading branch information
lukmzig committed Jan 15, 2025
1 parent 98885b7 commit e1d7d6a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,19 @@ public function testFullTextSearch(): void
->createAssetSearch()
->addModifier(new FullTextSearch('asset'))
;
$this->assertEquals([$asset->getId(), $asset2->getId()], $searchService->search($assetSearch)->getIds());
$this->assertIdArrayEquals([$asset->getId(), $asset2->getId()], $searchService->search($assetSearch)->getIds());

$assetSearch = $searchProvider
->createAssetSearch()
->addModifier(new FullTextSearch($asset2->getFilename()))
;
$this->assertEquals([$asset2->getId()], $searchService->search($assetSearch)->getIds());
}

private function assertIdArrayEquals(array $ids1, array $ids2)
{
sort($ids1);
sort($ids2);
$this->assertEquals($ids1, $ids2);
}
}

0 comments on commit e1d7d6a

Please sign in to comment.