2017 © Pedro PelĂĄez
 

library phpspec-code-coverage

Integrates CodeCoverage with PhpSpec

image

henrikbjorn/phpspec-code-coverage

Integrates CodeCoverage with PhpSpec

  • Tuesday, February 21, 2017
  • by henrikbjorn
  • Repository
  • 7 Watchers
  • 99 Stars
  • 571,813 Installations
  • PHP
  • 376 Dependents
  • 1 Suggesters
  • 32 Forks
  • 0 Open issues
  • 14 Versions
  • 3 % Grown

The README.md

PhpSpec Code Coverage

DEPRECATED: CodeCoverage should not be used with spec testing in order to see how good your tests are. For that reason, and because I don't use it myself, this library is deprecated and will not receive any updates etc. For a maintained fork, you can check [leanphp/phpspec-code-coverage][1]., (*1)

Install with Composer:, (*2)

``` bash composer require --dev henrikbjorn/phpspec-code-coverage, (*3)


Enable it in your `phpspec.yml` file: ``` yaml extensions: - PhpSpecCodeCoverage\CodeCoverageExtension

Now run your specs with the normal phpspec run and voilĂ  your code coverage will be available in coverage., (*4)

Configuration Options

It is possible to control a bit out how the code coverage is done through phpspec.yml. This is done by adding a hash of options to the extension key., (*5)

  • whitelist takes an array of directories to whitelist (default: lib, src).
  • whitelist_files takes an array of files to whitelist (default: none).
  • blacklist takes an array of directories to blacklist
  • blacklist_files takes an array of files to blacklist
  • format (optional) could be one or many of: clover, php, text, html (default html)
  • output takes a location relative to the place you are running phpspec run (default: coverage). If you configure multiple formats, takes a hash of format:output e.g.
extensions:
  PhpSpecCodeCoverage\CodeCoverageExtension:
    format:
      - html
      - clover
    output:
      html: coverage
      clover: coverage.xml
  • show_uncovered_files for including uncovered files in coverage reports (default true)
  • lower_upper_bound for coverage (default 35)
  • high_lower_bound for coverage (default 70)

Note: If the clover format option requires you to also set an output location!, (*6)

Running with phpdbg (PHP 7.x and up)

For faster execution, run phpspec with phpdbg instead of xdebug:, (*7)

phpdbg -qrr phpspec run

Note: The code coverage extension only works with phpdbg if you're using PHP 7. In PHP 5.6, phpdbg is missing the phpdbg_start_oplog function which is required to generate code coverage., (*8)

The Versions

21/02 2017

dev-master

9999999-dev

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

02/08 2016

3.0.1

3.0.1.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

31/07 2016

3.0.0

3.0.0.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

18/07 2016

dev-phpspec3

dev-phpspec3

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

08/07 2016

2.x-dev

2.9999999.9999999.9999999-dev

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

05/05 2016

2.1.0

2.1.0.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

02/02 2016

2.0.2

2.0.2.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

08/12 2015

2.0.1

2.0.1.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

04/11 2015

2.0.0

2.0.0.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

26/09 2015

1.x-dev

1.9999999.9999999.9999999-dev

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

11/12 2014

1.0.1

1.0.1.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

11/12 2014

1.0.0

1.0.0.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

04/07 2014

0.2.0

0.2.0.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires

 

The Development Requires

26/05 2014

0.1.0

0.1.0.0

Integrates CodeCoverage with PhpSpec

  Sources   Download

MIT

The Requires