Tests on Drupal 9 are currently failing:
https://www.drupal.org/pift-ci-job/1655810
One of the errors is:
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.
So test methods defining @expectedException should be refactored to use a call to expectException() instead.
See also the parent issue: #3129112: [meta] Drupal 9 support
Comments
Comment #2
megachrizThis patch could fix all
@expectedExceptiondeprecations.Comment #4
megachrizCommitted #2.