Skip to content

"No expectations were configured for the mock object ..." notice is emitted when with() is used without expects() #6509

@sebastianbergmann

Description

@sebastianbergmann

I believe that the notice that is currently triggered on PHPUnit 12.5 is luring people into a trap. Tests are being refactored from mocks to stubs because of that notice, only to discover that the freshly refactored tests break as soon as the project upgrades to PHPUnit 13.

Originally posted by @derrabus in #6504

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions