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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MegaChriz created an issue. See original summary.

MegaChriz’s picture

This patch could fix all @expectedException deprecations.

  • MegaChriz committed f383fe3 on 8.x-3.x
    Issue #3129113 by MegaChriz: Replaced @expectedException with...
MegaChriz’s picture

Status: Needs review » Fixed

Committed #2.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.