lint/phpunit/add-does-not-perform-assertions
Not in any preset. In Rector’s rector-phpunit/composer-based set. Needs the phpunit extension. Unsafe fix: it can change behavior.
What it does
Tests without assertion will have #[DoesNotPerformAssertions] attribute, or @doesNotPerformAssertions annotation on PHPUnit below 10
Configuration
[lint.rules]
"phpunit/add-does-not-perform-assertions" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
AddDoesNotPerformAssertionToNonAssertingTest(rector-phpunit)