Skip to content

Commit c372640

Browse files
Render total item.
1 parent dbce9f1 commit c372640

File tree

1 file changed

+21
-1
lines changed
  • PHP/CodeCoverage/Report/HTML/Renderer

1 file changed

+21
-1
lines changed

PHP/CodeCoverage/Report/HTML/Renderer/File.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,27 @@ public function render(PHP_CodeCoverage_Report_Node_File $node, $file, $title =
142142
*/
143143
protected function renderItems(PHP_CodeCoverage_Report_Node_File $node)
144144
{
145-
$items = '';
145+
$template = new Text_Template($this->templatePath . 'file_item.html');
146+
147+
$items = $this->renderItemTemplate(
148+
$template,
149+
array(
150+
'itemClass' => 'coverDirectory',
151+
'name' => 'Total',
152+
'numClasses' => $node->getNumClasses(),
153+
'numTestedClasses' => $node->getNumTestedClasses(),
154+
'numMethods' => $node->getNumMethods(),
155+
'numTestedMethods' => $node->getNumTestedMethods(),
156+
'linesExecutedPercent' => $node->getLineExecutedPercent(FALSE),
157+
'linesExecutedPercentAsString' => $node->getLineExecutedPercent(),
158+
'numExecutedLines' => $node->getNumExecutedLines(),
159+
'numExecutableLines' => $node->getNumExecutableLines(),
160+
'testedMethodsPercent' => $node->getTestedMethodsPercent(FALSE),
161+
'testedMethodsPercentAsString' => $node->getTestedMethodsPercent(),
162+
'testedClassesPercent' => $node->getTestedClassesPercent(FALSE),
163+
'testedClassesPercentAsString' => $node->getTestedClassesPercent()
164+
)
165+
);
146166

147167
return $items;
148168
}

0 commit comments

Comments
 (0)