lint/phpunit/no-expected-exception-annotation
In the code-quality set. Unsafe fix: it can change behaviour. Runs when phpunit is installed.
What it does
Replace @expectedException annotations with expectException() calls.
Configuration
[lint.rules]
"phpunit/no-expected-exception-annotation" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Options
| Name | Type | Allowed values | Default | Upstream name |
|---|---|---|---|---|
target |
enum |
3.2, 4.3, newest |
"newest" |
target |
use-class-const |
bool |
Any | true |
use_class_const |
Replaces
php_unit_no_expectation_annotation(php-cs-fixer, risky)