Skip to content

Commit d9fc30f

Browse files
committed
Add conditional
1 parent 46576ab commit d9fc30f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Context/FeatureContext.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ public static function forget_feature( AfterFeatureScope $scope ) {
185185
* @AfterSuite
186186
*/
187187
public static function merge_coverage_reports() {
188+
$with_code_coverage = (string) getenv( 'WP_CLI_TEST_COVERAGE' );
189+
190+
if ( ! \in_array( $with_code_coverage, [ 'true', '1' ], true ) ) {
191+
return;
192+
}
193+
188194
$filter = new Filter();
189195
$coverage = new CodeCoverage(
190196
( new Selector() )->forLineCoverage( $filter ),

0 commit comments

Comments
 (0)