Skip to content

Commit

Permalink
Assert only values exist and not the ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
bambamboole committed May 12, 2024
1 parent 4dcad3b commit ceb23b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Feature/TranslationFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ public function testItCanFindTranslationsInCode(): void
{
$translations = $this->createSubject()->findTranslations();

self::assertSame([
$expected = [
'test.dotted',
'test.dotted.additional',
'This is just a sentence',
'test undotted key',
'test',
], $translations);
];
foreach ($expected as $item) {
self::assertContains($item, $translations);
}
}

private function createSubject(): TranslationFinder
Expand Down

0 comments on commit ceb23b0

Please sign in to comment.