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
Cannot use "self" return type in mocked class #226
Comments
Good find. This is definitely fixable. On Sun, Nov 20, 2016, 5:12 AM mariusz-kraj-c notifications@github.com
|
I ran into this issue as well, I've created PR #254 to fix this. |
Support self return type in mocked class, fixes #226
I created entity class:
Then in test tried to create mock by
but test execution just halt at that line without any error. After some investigation i found out that mock content created by phake contains something like that:
the issue is that "self" mean in my case "User_PHAKE58319e767bab31" so the declaration is incompatibile with User class.
The simples fix (that I uses) is to explicy use "User" as return value.
I don't know if this is real issue but I wanted to save someone time searching for fix :)
The text was updated successfully, but these errors were encountered: