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

Use Prophecy's code generator #1

Open
tractorcow opened this issue Feb 14, 2018 · 0 comments
Open

Use Prophecy's code generator #1

tractorcow opened this issue Feb 14, 2018 · 0 comments

Comments

@tractorcow
Copy link
Owner

There's no point rewriting a code generator. The one provided by prophecy seems pretty perfect for our needs.

We should substitute their ProphecySubjectPatch for one that provides the necessary partial mocking ability we are looking for.

-return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());
+return $this->proxy()->invoke(__FUNCTION__, func_get_args(), function(...$args) {
+    return call_user_func_array(['parent', __FUNCTION__, $args);
+});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant