mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Cleanup
This commit is contained in:
@ -99,10 +99,9 @@ final class Runner implements RunnerInterface
|
|||||||
private function load(SuiteLoader $loader): void
|
private function load(SuiteLoader $loader): void
|
||||||
{
|
{
|
||||||
$this->beforeLoadChecks();
|
$this->beforeLoadChecks();
|
||||||
|
|
||||||
$loader->load();
|
$loader->load();
|
||||||
$this->pending = $this->options->functional()
|
$this->loadPestSuite();
|
||||||
? $loader->getTestMethods()
|
|
||||||
: $loader->getSuites();
|
|
||||||
|
|
||||||
$this->sortPending();
|
$this->sortPending();
|
||||||
|
|
||||||
@ -154,7 +153,7 @@ final class Runner implements RunnerInterface
|
|||||||
/**
|
/**
|
||||||
* Write output to JUnit format if requested.
|
* Write output to JUnit format if requested.
|
||||||
*/
|
*/
|
||||||
final private function log(): void
|
private function log(): void
|
||||||
{
|
{
|
||||||
if (($logJunit = $this->options->logJunit()) === null) {
|
if (($logJunit = $this->options->logJunit()) === null) {
|
||||||
return;
|
return;
|
||||||
@ -169,7 +168,7 @@ final class Runner implements RunnerInterface
|
|||||||
/**
|
/**
|
||||||
* Write coverage to file if requested.
|
* Write coverage to file if requested.
|
||||||
*/
|
*/
|
||||||
final private function logCoverage(): void
|
private function logCoverage(): void
|
||||||
{
|
{
|
||||||
if (!$this->hasCoverage()) {
|
if (!$this->hasCoverage()) {
|
||||||
return;
|
return;
|
||||||
@ -228,20 +227,18 @@ final class Runner implements RunnerInterface
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final private function hasCoverage(): bool
|
private function hasCoverage(): bool
|
||||||
{
|
{
|
||||||
return $this->options->hasCoverage();
|
return $this->options->hasCoverage();
|
||||||
}
|
}
|
||||||
|
|
||||||
final private function getCoverage(): ?CoverageMerger
|
private function getCoverage(): ?CoverageMerger
|
||||||
{
|
{
|
||||||
return $this->coverage;
|
return $this->coverage;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function doRun(): void
|
private function doRun(): void
|
||||||
{
|
{
|
||||||
$this->loadPestSuite();
|
|
||||||
|
|
||||||
$availableTokens = range(1, $this->options->processes());
|
$availableTokens = range(1, $this->options->processes());
|
||||||
while (count($this->running) > 0 || count($this->pending) > 0) {
|
while (count($this->running) > 0 || count($this->pending) > 0) {
|
||||||
$this->fillRunQueue($availableTokens);
|
$this->fillRunQueue($availableTokens);
|
||||||
@ -348,11 +345,5 @@ final class Runner implements RunnerInterface
|
|||||||
}, $occurrences, array_keys($occurrences)));
|
}, $occurrences, array_keys($occurrences)));
|
||||||
|
|
||||||
$this->pending = $tests;
|
$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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user