mahalay / phpspec-coverage-test
PhpSpec extension for testing code coverage
Installs: 2 228
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.3
- friends-of-phpspec/phpspec-code-coverage: ^6.0
- phpspec/phpspec: ^6.0 || ^7.0
Requires (Dev)
- phpro/grumphp: ^0.19 || ^1.0
- squizlabs/php_codesniffer: ^3.6
- symfony/var-dumper: ^5.3 || ^6.0
- vimeo/psalm: ^4.9
Suggests
- ext-xdebug: Install Xdebug to generate phpspec code coverage.
This package is not auto-updated.
Last update: 2025-03-05 09:40:42 UTC
README
A PhpSpec extension for testing code coverage without the need for coverage report being generated first.
Usage
Config
Create a phpspec.yaml
or phpspec.yaml.dist
file containing the following.
# phpspec.yaml.dist formatter.name: pretty suites: default_suite: namespace: Mahalay\PhpSpec\CoverageTest psr4_prefix: Mahalay\PhpSpec\CoverageTest extensions: FriendsOfPhpSpec\PhpSpec\CodeCoverage\CodeCoverageExtension: format: - html output: html: coverage Mahalay\PhpSpec\CoverageTest\Extension: min_coverage: 100.0
Adjust these settings accordingly. Then phpspec
on!
$ vendor/bin/phpspec run
If you don't have xdebug
installed use phpdbg
$ phpdbg -qrr vendor/bin/phpspec run