Skip to content

Commit

Permalink
Fixes #81. Don't depend on the LOCALE anymore to get the coverage per…
Browse files Browse the repository at this point in the history
…centage.

This broke for locales that used "," as a floating point seperator.
  • Loading branch information
edorian committed Sep 24, 2012
1 parent 8e09ff9 commit 389ba73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PHP_CodeCoverage 1.2.3
----------------------

* Added support for parentheses after method names in the `@covers` annotation.
* Fixed #81. Non-english locales broke the coverage bars in the html view.

PHP_CodeCoverage 1.2.2
----------------------
Expand Down
2 changes: 1 addition & 1 deletion PHP/CodeCoverage/Report/HTML/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ protected function getCoverageBar($percent)
$this->templatePath . 'coverage_bar.html'
);

$template->setVar(array('level' => $level, 'percent' => $percent));
$template->setVar(array('level' => $level, 'percent' => sprintf("%.2F", $percent)));

return $template->render();
}
Expand Down

0 comments on commit 389ba73

Please sign in to comment.