From 8eae64e276bad2dd5a727872b4c479b4318c77c6 Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Mon, 24 Feb 2020 11:58:33 +0000 Subject: [PATCH] Make sure to set the tests on your copied Coverage objects! --- src/Command/ChangePathPrefix.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Command/ChangePathPrefix.php b/src/Command/ChangePathPrefix.php index 2ed115e..cd7ef12 100644 --- a/src/Command/ChangePathPrefix.php +++ b/src/Command/ChangePathPrefix.php @@ -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);