Skip to content

Commit

Permalink
Fixing method covers taking priority over class coversNothing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Danack authored and sebastianbergmann committed Jul 21, 2018
1 parent 0102d46 commit cf61253
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Framework/TestResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,13 @@ public function run(Test $test): void

$annotations = $test->getAnnotations();

if (isset($annotations['class']['coversNothing']) || isset($annotations['method']['coversNothing'])) {
if (isset($annotations['method']['coversNothing'])) {
$coversNothing = true;
} elseif (isset($annotations['class']['coversNothing'])) {
if (!isset($annotations['method']['covers'])) {
// method covers takes priority over class coversNothing
$coversNothing = true;
}
}
}

Expand Down

0 comments on commit cf61253

Please sign in to comment.