Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
bin/
nbproject/
vendor/
build/
composer.phar
**/*.dbf
/composer.lock
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 3.1.x-dev

- Fixed a bug where a suffix when whitelisting files would default to `src`.
This would make reports not generate in case no `suffix` was defined in
configuration (see #28)
- Updated README to list all configuration options
- Updated `behat.yml.dist`

## [3.1.0] - 2017-10-17 - Legacy maintenance release

- Update PHP requirement to `>=5.6` (from `>=5.3.10`)
Expand Down
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,35 @@ default:
### Configuration Options

* `auth` - HTTP authentication options (optional).
- `create` (`method` / `path`) - *TBA*.
- `read` (`method` / `path`) - *TBA*.
- `delete` (`method` / `path`) - *TBA*.
- `create` (`method` / `path`) - override options for create method:
- `method` - specify a method (default: `POST`)
- `path` - specify path (default: `/`)
- `read` (`method` / `path`) - override options (method and path) for read
method.
- `method` - specify a method (default: `GET`)
- `path` - specify path (default: `/`)
- `delete` (`method` / `path`) - override options (method and path) for delete
method.
- `method` - specify a method (default: `DELETE`)
- `path` - specify path (default: `/`)
- `drivers` - a list of drivers for gathering code coverage data:
- `remote` - remote Xdebug driver.
- `local` - local Xdebug driver.
- `local` - local Xdebug driver (default).
- `remote` - remote Xdebug driver (disabled by default).
- `filter` - various filter options:
- `forceCoversAnnotation` - *TBA*
- `mapTestClassNameToCoveredClassName` - *TBA*
- `forceCoversAnnotation` - (default: `false`)
- `mapTestClassNameToCoveredClassName` - (default: `false`)
- `whiltelist` - whitelist specific options:
- `addUncoveredFilesFromWhiltelist` - *TBA*
- `processUncoveredFilesFromWhitelist` - *TBA*
- `addUncoveredFilesFromWhiltelist` - (default: `true`)
- `processUncoveredFilesFromWhitelist` - (default: `false`)
- `include` - a list of files or directories to include in whitelist:
- `directories` - key containing whitelisted directories to include.
- `files` - key containing whitelisted files to include.
- `suffix` - suffix for files to be included (default: `.php`)
- `prefix` - prefix of files to be included (optional)
- `files` - a list containing whitelisted files to include.
- `exclude` - a list of files or directories to exclude from whitelist:
- `directories` - key containing whitelisted directories to exclude.
- `suffix` - suffix for files to be included (default: `.php`)
- `prefix` - prefix of files to be included (optional)
- `files` - key containing whitelisted files to exclude.
- `report` - reporter options:
- `format` - specify report format (`html`, `clover`, `php`, `text`)
Expand Down
54 changes: 13 additions & 41 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,25 @@ default:
extensions:
LeanPHP\Behat\CodeCoverage\Extension:
# optional authentication
auth: ~
# auth:
# user: user
# password: password
create:
method: POST
path: /
read:
method: GET
path: /
delete:
method: DELETE
path: /
drivers:
- remote
- local
filter: ~
# filter:
# forceCoversAnnotation: false
# mapTestClassNameToCoveredClassName: false
# whitelist:
# addUncoveredFilesFromWhitelist: true
# processUncoveredFilesFromWhitelist: false
# include:
# directories:
# 'some_path':
# suffix: 'some_suffix'
# prefix: 'some_prefix'
# files:
# - 'some_file'
# exclude:
# directories:
# ...
# files:
# ...
# blacklist:
# include:
# directories:
# ...
filter:
forceCoversAnnotation: false
mapTestClassNameToCoveredClassName: false
whitelist:
addUncoveredFilesFromWhitelist: true
processUncoveredFilesFromWhitelist: false
include:
directories:
'src': ~
# files:
# ...
# - 'script.php'
# exclude:
# directories:
# ...
# 'vendor': ~
# files:
# ...
# - src/script.php
report:
format: html
options:
target:: /tmp/report
target: build/coverage-behat
2 changes: 1 addition & 1 deletion src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function configure(ArrayNodeDefinition $builder)
->useAttributeAsKey('name')
->prototype('array')
->children()
->scalarNode('prefix')->defaultValue('src')->end()
->scalarNode('prefix')->defaultValue('')->end()
->scalarNode('suffix')->defaultValue('.php')->end()
->end()
->end()
Expand Down