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
Add ability to set custom filename rewrite callbacks #2116
Conversation
Here is an example of test that passes with our patches: https://github.com/badoo/soft-mocks/blob/master/example-phpunit/ExampleTest.php |
Here is an article that talks a little bit about history of Soft Mocks as well: https://techblog.badoo.com/blog/2016/03/14/how-badoo-saved-one-million-dollars-switching-to-php7/ |
Thank you for your contribution. It looks interesting but at first glance I do not fully understand why it does what and how and what the consequences of merging it may be. I will try to look into this ASAP but it might take a while. |
By any chance, is there English documentation available for Soft Mocks? |
English documentation for Soft Mocks is on the way. It should be there in
|
English README is complete: https://github.com/badoo/soft-mocks/blob/master/README.md |
Thank you, Yuriy, for providing English documentation for Soft Mocks. After reading "Soft Mocks will work even without any phpunit patches" I have to say, though, that my motivation to add additional complexity to PHPUnit for this is rather limited. The two limitations listed, "unreadable" stack traces and not being able to redefine code units declared in test code, don't sound too bad, to be honest. |
You haven't seen this ugly stack trace yet. It contains paths to I agree that modification is done in a very "straightforward" fashion and Soft Mocks is intended to be runkit and uopz-compatible and a lot of tests
|
Thank you for your contribution but I decided not to merge this. |
We implemented "soft mocks" project that is intended to be able to replace runkit and uopz. We do it by rewriting code "on the fly".
Project: https://github.com/badoo/soft-mocks
We used Soft Mocks to rewrite our tests (60k tests) so that PHP7 is supported on our website.
Here is the suggested patch to be able to use Soft Mocks with phpunit.