Skip to content

[PHPUnit60] Count expectUserDeprecationMessage() as assert in AddDoesNotPerformAssertionToNonAssertingTestRector - #825

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-expect-user-deprecation-message
Nov 14, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-expect-user-deprecation-message

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Extracted from #822 - the part that does not need AstResolver.

PHPUnit counts every expected deprecation as an assertion, so tests using expectUserDeprecationMessage() / expectUserDeprecationMessageMatches() must not get #[DoesNotPerformAssertions]. Adds the expectUserDeprecationMessage prefix, which covers both.

The parent:: call and lifecycle hook changes stay in #822, as both resolve parent classes via AstResolver and need to be checked against the new bench.

Refs rectorphp/rector#9965

…NotPerformAssertionToNonAssertingTestRector

Extracted from #822.

Co-authored-by: bjorn <bjorn@swis.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant