From c1cfaf872a1bf1d36ce722caccae5567b49186a5 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Fri, 21 Apr 2023 09:20:16 +0200 Subject: [PATCH] Sort test classes alphabetically by their prettified name --- src/Logging/TestDox/TestMethod/TestResultCollector.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Logging/TestDox/TestMethod/TestResultCollector.php b/src/Logging/TestDox/TestMethod/TestResultCollector.php index 96c18729bc9..b904cea466c 100644 --- a/src/Logging/TestDox/TestMethod/TestResultCollector.php +++ b/src/Logging/TestDox/TestMethod/TestResultCollector.php @@ -10,6 +10,7 @@ namespace PHPUnit\Logging\TestDox; use function assert; +use function ksort; use function usort; use PHPUnit\Event\Code\TestMethod; use PHPUnit\Event\Code\Throwable; @@ -83,6 +84,8 @@ static function (TestDoxTestMethod $a, TestDoxTestMethod $b): int $result[$prettifiedClassName] = TestResultCollection::fromArray($tests); } + ksort($result); + return $result; }