function PlainTextRenderer::reduce
@psalm-return array<string, 'x'|' '>
1 call to PlainTextRenderer::reduce()
- PlainTextRenderer::render in vendor/
phpunit/ phpunit/ src/ Logging/ TestDox/ PlainTextRenderer.php - @psalm-param array<string, TestResultCollection> $tests
File
-
vendor/
phpunit/ phpunit/ src/ Logging/ TestDox/ PlainTextRenderer.php, line 48
Class
- PlainTextRenderer
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\Logging\TestDoxCode
private function reduce(TestResultCollection $tests) : array {
$result = [];
foreach ($tests as $test) {
$prettifiedMethodName = $test->test()
->testDox()
->prettifiedMethodName();
$success = true;
if ($test->status()
->isError() || $test->status()
->isFailure() || $test->status()
->isIncomplete() || $test->status()
->isSkipped()) {
$success = false;
}
if (!isset($result[$prettifiedMethodName])) {
$result[$prettifiedMethodName] = $success ? 'x' : ' ';
continue;
}
if ($success) {
continue;
}
$result[$prettifiedMethodName] = ' ';
}
return $result;
}