doyo/phpspec-code-coverage

PhpSpec Code Coverage Extension

dev-master / 1.0.x-dev 2019-06-17 02:38 UTC

This package is auto-updated.

Last update: 2024-04-17 14:55:30 UTC


README

Provide code coverage extension during phpspec run

License Version Build Status Coverage Score

Support

  • PHP: >=7.0
  • Behat: >=3.0
  • PHP Code Coverage: >=5.3

Install

$ composer require doyo/phpspec-code-coverage

After installing this extension, you can collect code coverage by using this command:

$ ./vendor/bin/phpspec run --coverage

The reports will be generated in target directory as you defined in configuration.

Configuration

# phpspec.yaml.dist
extensions:
    Doyo\PhpSpec\CodeCoverage\Extension:
        filters:
            whitelist:
                - src
            blacklist:
                - path/to/blacklist/dir
        reports:
            php: build/cov/phpspec.cov
            html: build/phpspec