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
Strange behavior after update to 0.7.0 #21
Comments
You're right that mocked classes now feature an __isset() method. 0.7 uses it for public property mocking. Do you have an actual test case and the relevant class I can use to replicate the issue? If I follow what you are mocking, and how, I'll be able to diagnose the problem. |
Hi and thanks for quick response. The class itself class Test_Magic
} And a test: class Test_MagicTest extends Shift_Test_Case
} This throws the BadMethodCallException: Method Test_Magic::__isset() does not exist on this mock object Please let me now if I can provide any further info or assis in any way. |
Please excuse github markdown |
Thanks for that. I've committed a small patch to exclude __isset() from being replaced. That seems to resolve the exception. Let me know if the git master is now running clean for you. |
Yes, that did it. Now everything is back to normal. Thanks a lot. |
Hi, Pádraic.
Today I've updated mockery to the latest from githib that is 0.7.0 and discivered some strange bahevior - all my tests are suddenly failing with some strange message when tearDown() is done.
Here's the message:
BadMethodCallException: Method RequestScope::__isset() does not exist on this mock object
And the call stack:
/library/Mockery/Container.php:197
/library/Mockery/Container.php:182
/library/Mockery.php:71
/library/Shift/Test/Case.php:172
The problem appears to be related to the mocked class having an __isset() method. But that was fine in previous Mockery versions...
I'm going to revert back to previous version for now.
Please tell me if I can give you any firther informstion on this issue.
Dmitry.
The text was updated successfully, but these errors were encountered: