Skip to content

Commit e1a93c3

Browse files
authored
PHPUnit event: respect order of triggering TestRunner\Started after TestSuite\Loaded (#1037)
1 parent 3d0095c commit e1a93c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/WrapperRunner/ApplicationForWrapperWorker.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ public function runTest(string $testPath): int
9696
TestSuiteBuilder::from($testSuite),
9797
);
9898

99+
EventFacade::emitter()->testRunnerStarted();
100+
101+
if ($this->configuration->executionOrder() === TestSuiteSorter::ORDER_RANDOMIZED) {
102+
mt_srand($this->configuration->randomOrderSeed());
103+
}
104+
99105
(new TestSuiteFilterProcessor())->process($this->configuration, $testSuite);
100106

101107
if ($filter !== null) {
@@ -228,12 +234,6 @@ private function bootstrap(): void
228234
$extensionRequiresCodeCoverageCollection,
229235
);
230236

231-
EventFacade::emitter()->testRunnerStarted();
232-
233-
if ($this->configuration->executionOrder() === TestSuiteSorter::ORDER_RANDOMIZED) {
234-
mt_srand($this->configuration->randomOrderSeed());
235-
}
236-
237237
$this->hasBeenBootstrapped = true;
238238
}
239239

0 commit comments

Comments
 (0)