Skip to content

Commit

Permalink
Don't suggest refactoring to something that's also deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell authored and sebastianbergmann committed Jan 17, 2020
1 parent 9b1f920 commit cae69be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ private function setExpectedExceptionFromAnnotation(): void
);

if ($expectedException !== false) {
$this->addWarning('The @expectedException, @expectedExceptionCode, @expectedExceptionMessage, and @expectedExceptionMessageRegExp annotations are deprecated. They will be removed in PHPUnit 9. Refactor your test to use expectException(), expectExceptionCode(), expectExceptionMessage(), or expectExceptionMessageRegExp() instead.');
$this->addWarning('The @expectedException, @expectedExceptionCode, @expectedExceptionMessage, and @expectedExceptionMessageRegExp annotations are deprecated. They will be removed in PHPUnit 9. Refactor your test to use expectException(), expectExceptionCode(), expectExceptionMessage(), or expectExceptionMessageMatches() instead.');

$this->expectException($expectedException['class']);

Expand Down

0 comments on commit cae69be

Please sign in to comment.