From 5526d4c24d20f01aed1a42d47014a4c1bce1a6a7 Mon Sep 17 00:00:00 2001 From: luke Date: Thu, 5 Aug 2021 13:51:55 +0100 Subject: [PATCH] Cleanup --- src/Console/Paratest/Runner.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/Console/Paratest/Runner.php b/src/Console/Paratest/Runner.php index d766b722..56d31e42 100644 --- a/src/Console/Paratest/Runner.php +++ b/src/Console/Paratest/Runner.php @@ -99,10 +99,9 @@ final class Runner implements RunnerInterface private function load(SuiteLoader $loader): void { $this->beforeLoadChecks(); + $loader->load(); - $this->pending = $this->options->functional() - ? $loader->getTestMethods() - : $loader->getSuites(); + $this->loadPestSuite(); $this->sortPending(); @@ -154,7 +153,7 @@ final class Runner implements RunnerInterface /** * Write output to JUnit format if requested. */ - final private function log(): void + private function log(): void { if (($logJunit = $this->options->logJunit()) === null) { return; @@ -169,7 +168,7 @@ final class Runner implements RunnerInterface /** * Write coverage to file if requested. */ - final private function logCoverage(): void + private function logCoverage(): void { if (!$this->hasCoverage()) { return; @@ -228,20 +227,18 @@ final class Runner implements RunnerInterface ); } - final private function hasCoverage(): bool + private function hasCoverage(): bool { return $this->options->hasCoverage(); } - final private function getCoverage(): ?CoverageMerger + private function getCoverage(): ?CoverageMerger { return $this->coverage; } private function doRun(): void { - $this->loadPestSuite(); - $availableTokens = range(1, $this->options->processes()); while (count($this->running) > 0 || count($this->pending) > 0) { $this->fillRunQueue($availableTokens); @@ -348,11 +345,5 @@ final class Runner implements RunnerInterface }, $occurrences, array_keys($occurrences))); $this->pending = $tests; - - // We need to reset the printer because we don't want to output - - foreach ($this->pending as $pending) { - $this->printer->addTest($pending); - } } }