We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96b3565 commit 3ede29aCopy full SHA for 3ede29a
src/NodeAnalyzer/TestsNodeAnalyzer.php
@@ -58,6 +58,16 @@ public function isTestClassMethod(ClassMethod $classMethod): bool
58
return true;
59
}
60
61
+ foreach ($classMethod->getAttrGroups() as $attrGroup) {
62
+ $hasTestAttribute = array_any(
63
+ $attrGroup->attrs,
64
+ static fn($attribute): bool => $attribute->name->toString() === 'PHPUnit\\Framework\\Attributes\\Test'
65
+ );
66
+ if ($hasTestAttribute) {
67
+ return \true;
68
+ }
69
70
+
71
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($classMethod);
72
return $phpDocInfo->hasByName('test');
73
0 commit comments