Skip to content
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

Option to use custom objectToArray implementation #603

Closed
MartinMystikJonas opened this issue Jun 7, 2016 · 4 comments
Closed

Option to use custom objectToArray implementation #603

MartinMystikJonas opened this issue Jun 7, 2016 · 4 comments
Labels
Feature Request request a new feature has pr

Comments

@MartinMystikJonas
Copy link
Contributor

Some of our object have public properties accessible only when object is in correct state. If object is in wrong state attempt to read this property raises excetion (magic __get).

This is problem when Mockery tries to convert these objects to array in for example Unexpected calls messages.

We would like to have option to set custom implemenation of objectToArray via configuration.

@davedevelopment
Copy link
Collaborator

I think my preference would be to have a global toggle that disables that deep inspection for output.

@robertbasic robertbasic added the Feature Request request a new feature label May 9, 2017
@MartinMystikJonas
Copy link
Contributor Author

It's more than year since I proposed this change. Any change in opinion on this? I can prepare PR with this improvement if it will be accepted as good solution.

@MartinMystikJonas
Copy link
Contributor Author

Solution proposed in PR #766

@davedevelopment This solution allow you to disable deep inspection of some objects - just set empty formatter

@ghostwriter
Copy link
Member

Resolved #766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request request a new feature has pr
Projects
None yet
Development

No branches or pull requests

4 participants