Skip to content

Commit

Permalink
CodeCoverage: Fix excluding of files when whildcard patterns are used
Browse files Browse the repository at this point in the history
  • Loading branch information
Naktibalda committed Feb 21, 2024
1 parent a271f00 commit 5c41717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Codeception/Coverage/Filter.php
Expand Up @@ -165,7 +165,7 @@ public function blackList(array $config): self

private function matchFileOrDirectory(string $fileOrDir): Finder
{
$fullPath = Configuration::projectDir() . DIRECTORY_SEPARATOR . $fileOrDir;
$fullPath = Configuration::projectDir() . $fileOrDir;
$finder = Finder::create();
if (is_dir($fullPath)) {
$finder->in($fullPath);
Expand Down Expand Up @@ -193,7 +193,7 @@ protected function matchWildcardPattern(string $pattern): Finder
if ($lastPath === '*') {
$finder->in(Configuration::projectDir() . implode('/', $parts));
} else {
$finder->in(Configuration::projectDir() . implode('/', $parts) . '/' . $lastPath);
$finder->in(Configuration::projectDir() . implode('/', [...$parts, $lastPath]));
}
}
$finder->ignoreVCS(true)->files();
Expand Down

0 comments on commit 5c41717

Please sign in to comment.