From 61181fc974d87a6da6c28b187291607c7fa95447 Mon Sep 17 00:00:00 2001 From: Jeroen de Graaf Date: Sat, 12 Oct 2024 15:59:45 +0200 Subject: [PATCH] Fix flaky test The order of files found by the Finder depends on the local file system. On purpose the Finder does not sort, as it can be a big list, as its simply not needed to work with Gember Event Sourcing; the order is irrelevant. --- tests/SymfonyFinderTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/SymfonyFinderTest.php b/tests/SymfonyFinderTest.php index 51d9773..f7a353f 100644 --- a/tests/SymfonyFinderTest.php +++ b/tests/SymfonyFinderTest.php @@ -28,10 +28,12 @@ public function itShouldReturnAllFilesInPath(): void { $files = $this->finder->getFiles(__DIR__ . '/TestDoubles'); + sort($files); + self::assertSame([ - __DIR__ . '/TestDoubles/TestClass.php', __DIR__ . '/TestDoubles/Subfolder/AnotherClass.php', __DIR__ . '/TestDoubles/Subfolder/TestClass.php', + __DIR__ . '/TestDoubles/TestClass.php', ], $files); } }