Skip to content

codebtech/coveragebadge

Folders and files

NameName
Last commit message
Last commit date
Jun 1, 2024
Jun 26, 2024
May 30, 2024
Nov 1, 2024
May 31, 2024
Jun 26, 2024
Jun 26, 2024
May 31, 2024
Feb 2, 2025
Jun 1, 2024
Jun 1, 2024
May 31, 2024
May 31, 2024
Jun 1, 2024
May 31, 2024
Jun 1, 2024
Jun 1, 2024
May 31, 2024

Repository files navigation

CoverageBadge

PHP lint & test PHP Code Coverage Packagist dowloads

CoverageBadge is a PHP library for creating SVG coverage badges from Clover XML files.

Installation

composer require codebtech/coveragebadge --dev

Features

  • Produces a code coverage badge utilizing a Clover coverage XML file
  • Creates a code coverage badge from several Clover XML files, automatically incorporating the coverage percentages
  • Accepts a coverage name as an input to include in the generated badge

Usage

  • Execute the command to generate badge for single Clover XML input
vendor/bin/coverage-badge /path/to/clover.xml /path/to/badge/destination.svg test-name
  • To blend multiple Clover files, enumerate the XML inputs separated by commas and use the command
vendor/bin/coverage-badge /path/to/clover.xml,/path/to/clover2.xml /path/to/badge/destination.svg test-name

Acknowledgements

This library is inspired by JASchilz/PHPCoverageBadge