Skip to content

Commit e8d3ca8

Browse files
authored
Merge pull request #32 from leanphp/fix-text-report
Fix text report
2 parents f8afe32 + 2d74b00 commit e8d3ca8

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111
- Fixed a bug where a suffix when whitelisting files would default to `src`.
1212
This would make reports not generate in case no `suffix` was defined in
1313
configuration.
14+
- Fixed Text report printing (issue #12)
1415
- `phpunit/php-code-coverage` dependency version requirement has been updated
1516
from `~4.0|~5.0` to `~5.0` as we do not support version `4.0` anymore.
1617
- Updated README to list all configuration options

behat.yml.dist

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
default:
22
extensions:
33
LeanPHP\Behat\CodeCoverage\Extension:
4-
# optional authentication
5-
drivers:
6-
- local
74
filter:
8-
forceCoversAnnotation: false
9-
mapTestClassNameToCoveredClassName: false
105
whitelist:
11-
addUncoveredFilesFromWhitelist: true
12-
processUncoveredFilesFromWhitelist: false
136
include:
147
directories:
158
'src': ~
16-
# files:
17-
# - 'script.php'
18-
# exclude:
19-
# directories:
20-
# 'vendor': ~
21-
# files:
22-
# - src/script.php
239
report:
24-
format: html
10+
format: html
2511
options:
2612
target: build/coverage-behat

src/Service/ReportService.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public function generateReport(CodeCoverage $coverage)
5252
$options = $this->config['report']['options'];
5353

5454
$report = $this->factory->create($format, $options);
55-
$report->process($coverage);
55+
$output = $report->process($coverage);
56+
57+
if ('text' === $format) {
58+
print_r($output);
59+
}
5660
}
5761
}

0 commit comments

Comments
 (0)