Skip to content

Commit

Permalink
Make sure to set the tests on your copied Coverage objects!
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperaj committed Feb 24, 2020
1 parent 8c90708 commit 8eae64e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Command/ChangePathPrefix.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,14 @@ protected function iterateCoverageFiles(array $files, PathFixer $fixer): array
$whiteList = $coverage->filter()->getWhitelistedFiles();
$whiteList = $fixer->fix($whiteList);

$tests = $coverage->getTests();

$filter = new Filter();
$filter->setWhitelistedFiles($whiteList);

$coverage = new CodeCoverage(null, $filter);
$coverage->setData($data);
$coverage->setTests($tests);

return $coverage;
}, $files);
Expand Down

0 comments on commit 8eae64e

Please sign in to comment.