Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Conversation

@Darhazer
Copy link

One thing that ReturnValueMap lacks is flexibility regarding the arguments the method was invoked with. It works only with exact match. As a side effect, if you have floats as arguments, it may fail. As a solution, I've added support for Framework_Constraint objects.

Another one is that the return value is just a simple value. So I've added the option to use Framework_Stub objects, such as ReturnCallback

@Darhazer
Copy link
Author

@sebastianbergmann any chance you would accept such a PR? It resolves the issues listed in #318 (or at least provides workaround for them). I will rebase and apply any changes you request

@panvid
Copy link

panvid commented Jun 21, 2017

Dear @sebastianbergmann can this PR be merged please? Problem with mocking functions which have objects in parameters is very very annoying.

@Darhazer
Copy link
Author

@dpauli I have rebased my fork on the current master and published as separate package. Feel free to use it and I'll take care of rebasing if needed
https://github.com/Darhazer/better-phpunit-mock-objects

cc: @courtney-miles @micguo @mmikitka

@sebastianbergmann
Copy link
Owner

Thank you for your contribution. I am sorry that I did not get around to review/merge this sooner. Please send a new pull request against current master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants