Skip to content

Commit

Permalink
Merge branch '8.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 20, 2019
2 parents 803009d + 1a4b3c8 commit a870f5c
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/Framework/TestResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -867,24 +867,29 @@ public function run(Test $test): void
);
}
}

$this->addFailure(
$test,
new RiskyTestError(\sprintf(
"This test did not perform any assertions\n\n%s:%d",
$reflected->getFileName(),
$reflected->getStartLine()
)),
new RiskyTestError(
\sprintf(
"This test did not perform any assertions\n\n%s:%d",
$reflected->getFileName(),
$reflected->getStartLine()
)
),
$time
);
} elseif ($this->beStrictAboutTestsThatDoNotTestAnything &&
$test->doesNotPerformAssertions() &&
$test->getNumAssertions() > 0) {
$this->addFailure(
$test,
new RiskyTestError(\sprintf(
'This test is annotated with "@doesNotPerformAssertions" but performed %d assertions',
$test->getNumAssertions()
)),
new RiskyTestError(
\sprintf(
'This test is annotated with "@doesNotPerformAssertions" but performed %d assertions',
$test->getNumAssertions()
)
),
$time
);
} elseif ($this->beStrictAboutOutputDuringTests && $test->hasOutput()) {
Expand Down

0 comments on commit a870f5c

Please sign in to comment.