addvilz/phpspec-cover

Opinionated code coverage for PHPSpec

v0.1.4 2016-03-16 15:14 UTC

This package is not auto-updated.

Last update: 2024-11-07 00:02:38 UTC


README

WIP, but working.

About

This is a slightly more opinionated version of PhpSpec code coverage library. It is designed to give you insight about spec you are currently working on, without interfering when PHPSpec is executed against full test suite (there is extension for that).

Features:

  • Automatically disables itself for when you run suites (more than 1 specs, will be configurable in later versions);
  • Only outputs reports in CLI;
  • Outputs line-by-line source code with coverage information in CLI as well;
  • Coverage report is only generated for class that the current spec is implemented against.

Installation

composer require addvilz/phpspec-cover

Configuration

In your phpspec.yml:

extensions:
    - Addvilz\PhpSpecCover\Extension
phpspec_cover:
    max_specs: 1

Credit where credit is due

henrikbjorn/phpspec-code-coverage by henrikbjorn. If you need a full fledged code coverage extension for PHPSpec, this is the one you should be looking at.

License

Apache 2.0