function HtmlRenderer::reduce
@psalm-return array<string, 'success'|'defect'>
1 call to HtmlRenderer::reduce()
- HtmlRenderer::render in vendor/
phpunit/ phpunit/ src/ Logging/ TestDox/ HtmlRenderer.php - @psalm-param array<string, TestResultCollection> $tests
File
-
vendor/
phpunit/ phpunit/ src/ Logging/ TestDox/ HtmlRenderer.php, line 136
Class
- HtmlRenderer
- @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();
if (!isset($result[$prettifiedMethodName])) {
$result[$prettifiedMethodName] = $test->status()
->isSuccess() ? 'success' : 'defect';
continue;
}
if ($test->status()
->isSuccess()) {
continue;
}
$result[$prettifiedMethodName] = 'defect';
}
return $result;
}