Skip to content

Commit cf61253

Browse files
Danacksebastianbergmann
authored andcommitted
Fixing method covers taking priority over class coversNothing.
1 parent 0102d46 commit cf61253

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Framework/TestResult.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,13 @@ public function run(Test $test): void
568568

569569
$annotations = $test->getAnnotations();
570570

571-
if (isset($annotations['class']['coversNothing']) || isset($annotations['method']['coversNothing'])) {
571+
if (isset($annotations['method']['coversNothing'])) {
572572
$coversNothing = true;
573+
} elseif (isset($annotations['class']['coversNothing'])) {
574+
if (!isset($annotations['method']['covers'])) {
575+
// method covers takes priority over class coversNothing
576+
$coversNothing = true;
577+
}
573578
}
574579
}
575580

0 commit comments

Comments
 (0)