We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfa048c commit dcb5653Copy full SHA for dcb5653
src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php
@@ -73,10 +73,19 @@ public function startTest($test)
73
$r = new \ReflectionProperty($testClass, 'annotationCache');
74
$r->setAccessible(true);
75
76
+ $covers = $sutFqcn;
77
+ if (!\is_array($sutFqcn)) {
78
+ $covers = [$sutFqcn];
79
+ while ($parent = get_parent_class($sutFqcn)) {
80
+ $covers[] = $parent;
81
+ $sutFqcn = $parent;
82
+ }
83
84
+
85
$cache = $r->getValue();
86
$cache = array_replace_recursive($cache, array(
87
\get_class($test) => array(
- 'covers' => \is_array($sutFqcn) ? $sutFqcn : array($sutFqcn),
88
+ 'covers' => $covers,
89
),
90
));
91
$r->setValue($testClass, $cache);
0 commit comments