We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab84da2 commit 5370de1Copy full SHA for 5370de1
src/Logging/TestDox/TestMethod/TestResultCollector.php
@@ -10,6 +10,7 @@
10
namespace PHPUnit\Logging\TestDox;
11
12
use function assert;
13
+use function usort;
14
use PHPUnit\Event\Code\TestMethod;
15
use PHPUnit\Event\Code\Throwable;
16
use PHPUnit\Event\EventFacadeIsSealedException;
@@ -71,6 +72,14 @@ public function testMethodsGroupedByClass(): array
71
72
$result = [];
73
74
foreach ($this->tests as $prettifiedClassName => $tests) {
75
+ usort(
76
+ $tests,
77
+ static function (TestDoxTestMethod $a, TestDoxTestMethod $b): int
78
+ {
79
+ return $a->test()->line() <=> $b->test()->line();
80
+ }
81
+ );
82
+
83
$result[$prettifiedClassName] = TestResultCollection::fromArray($tests);
84
}
85
0 commit comments