You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some PHP classes can be difficult, if not impossible, to mock. This page lists
classes that may cause issues when mocking with Phony.
Final classes
In general, classes marked as final cannot be mocked. However, if the class in
question implements an interface, or extends another class that can be mocked,
proxy mocks may be a workable solution.
Enumerations
Enumerations are marked final internally. See the section on Final classes
for options.
Unsupported classes
Mocking of the following classes is not supported by Phony:
__PHP_Incomplete_Class
Closure (because it's final)
The Phony wiki is a place for documentation that may be frequently updated,
or where updates do not necessarily coincide with a particular release.
These pages are only an addendum to the main documentation, which contains
more detailed information.