Skip to content

[PHPUnit120] Skip mocks with expectations in AllowMockObjectsForDataProviderRector - #859

Merged
TomasVotruba merged 4 commits into
mainfrom
allow-mock-objects-expectations
Dec 3, 2026
Merged

TomasVotruba merged 4 commits into
mainfrom
allow-mock-objects-expectations

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Continues #857 - includes its commits, plus a few more cases where PHPUnit does not report the mock, or still does.

PHPUnit reports a mock only when it has neither an invocation count rule nor a parameters rule (MockObjectRegistry::verify()). Now:

Fixes rectorphp/rector#9984

@TomasVotruba
TomasVotruba merged commit 43eba93 into main Dec 3, 2026
15 checks passed
@TomasVotruba
TomasVotruba deleted the allow-mock-objects-expectations branch December 3, 2026 10:00
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.

Rector adds attribute AllowMockObjectsWithoutExpectations when it's not needed

2 participants