This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 154
Trigger an error when final or private method is configured #296
Comments
Thanks for raising this on my behave, Sebastian. |
Thank me after I have actually fixed this, @adamcameron :-) I have started to work on this on the https://github.com/sebastianbergmann/phpunit-mock-objects/tree/issue-296/trigger-error-when-configuring-final-private-static branch. No promises on when I'll be able to finish this, though. |
sebastianbergmann
changed the title
Trigger an error when final, private, or static method is configured
Trigger an error when final or private method is configured
Mar 4, 2016
sebastianbergmann
added a commit
to sebastianbergmann/phpunit
that referenced
this issue
Mar 4, 2016
Is it not ready yet? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
final
andprivate
methods cannot be stubbed or mocked. They are ignored and retain their original behavior.It would be nice if PHPUnit could emit a warning when test code tries to configure a
final
orprivate
method.Example
Current Result
Desired Result
The text was updated successfully, but these errors were encountered: