From ceb23b059179c80095ae64404be2e8ed3c787bf0 Mon Sep 17 00:00:00 2001 From: bambamboole Date: Sun, 12 May 2024 17:48:26 +0200 Subject: [PATCH] Assert only values exist and not the ordering --- tests/Feature/TranslationFinderTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Feature/TranslationFinderTest.php b/tests/Feature/TranslationFinderTest.php index 709572c..db48f03 100644 --- a/tests/Feature/TranslationFinderTest.php +++ b/tests/Feature/TranslationFinderTest.php @@ -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