8000 bug #32902 [PhpUnitBridge] Allow sutFqcnResolver to return array (Vin… · symfony/symfony@926246b · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 926246b

Browse files
bug #32902 [PhpUnitBridge] Allow sutFqcnResolver to return array (VincentLanglet)
This PR was merged into the 3.4 branch. Discussion ---------- [PhpUnitBridge] Allow sutFqcnResolver to return array | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #... | License | MIT | Doc PR | Phpunit handle multiple covers annotation: ``` /** * @Covers ClassOne * @Covers ClassTwo */ ``` The coverage solver was only allowed to return `ClassOne` or `ClassTwo` since it was transformed to `[ClassName]`. Returning `[ClassOne, ClassTwo]` was transform to [[ClassOne, ClassTwo]]` which was creating an error with phpunit. This PR fixed this case. Commits ------- 1451c0b Allow sutFqcnResolver to return array
2 parents dd814bf + 1451c0b commit 926246b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function startTest($test)
7676
$cache = $r->getValue();
7777
$cache = array_replace_recursive($cache, array(
7878
\get_class($test) => array(
79-
'covers' => array($sutFqcn),
79+
'covers' => \is_array($sutFqcn) ? $sutFqcn : array($sutFqcn),
8080
),
8181
));
8282
$r->setValue($testClass, $cache);

0 commit comments

Comments
 (0)
0