-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method with an enum argument and default value can't be mocked #567
Comments
This error has nothing to do with |
True, I think I also observed an issue with |
If there is also an issue with |
I reduced this issue to the problem with the enum argument; after testing the case with the |
I confirm the issue. As soon as a default value is used for an argument typed with a |
I can also confirm this. The problem is, that the generated default value is in the wrong namespace, because the leading This seems only to be a problem in PHP 8.1, see: https://3v4l.org/3JPCM I proposed a fix: #618 |
Hi,
given this enum (PHP 8.1+):
And an interface with a method using the enum as default argument of a method:
And a service using the interface as a dependency:
The following test fails:
The error message is:
When passing the default value explicitly works though.
The text was updated successfully, but these errors were encountered: