-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
All mutants escapes when using function-mocking
and patchwork
#1827
Comments
I'm pretty sure that We had similar issue with
However, after a quick look I don't see that Patchwork2 uses Stream Wrapper, seems like there is another black magic. Anyway, personally I'm not using this lib and not going to, so if you want to understand the reason - I'm afraid you are the best person who can do it. Probably patchwork's maintainers can give some ideas where to look at and what can be the issue? @antecedent |
function-mocking
and patchwork
Patchwork does use stream wrappers; specifically, it does so from Patchwork\CodeManipulation\Stream. I will try to come up with some solution along the lines of the analogous issue that you linked, in a couple of days or so. |
You can see here how it was fixed in the other library: In a nutshell, |
Many thanks to everyone who provided helpful hints! I think I might be done with the fix. @Loki3000, could you try again with Patchwork |
@antecedent unfortunately TypeError appears after update:
|
Sorry. I had left in a bug in the stream wrapper's opendir(). It should be fixed now. Please retry with 2.1.24. |
@antecedent thanks for fix! But same error still remains in next string
|
For the time being, please replace your |
Now works well. Thanks! |
Thank you @antecedent & @Loki3000 |
Wrong test results when using function-mocker (https://github.com/lucatume/function-mocker). All mutants are escapes.
If using function mocking all mutants escapes.
Simple class with a one method and one external function:
Test class with mocking myFunc:
PHPUnit returns no errors
trying Infection
one mutant generated and escaped. Lets check log
Try to make same changes in code and run phpunit again:
Configs, test files and logs is in https://github.com/Loki3000/infection_issue
The text was updated successfully, but these errors were encountered: