addvilz / phpspec-cover
Opinionated code coverage for PHPSpec
Installs: 2 764
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- phpspec/phpspec: ~2.0
- phpunit/php-code-coverage: ~3.2
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