-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Fix phpunit-wrapper from resetting variables in global scope in WrapperRunner #540
Conversation
Codecov Report
@@ Coverage Diff @@
## master #540 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 547 547
===========================================
Files 25 25
Lines 1703 1703
===========================================
Hits 1703 1703 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the idea of the issue, but please can you try to write a test for the bug?
It seems an important one, I'd like to prevent it from being reintroduced by a future refactor
It's problematic, cause phpunit-wrapper fails, and paratest doing nothing, he is waiting for some command or idk what. It will never complete. |
That's ok: the pipeline has Please try to write a test so I can see the pipeline failing |
Okey, I written test, that fails on master branch (branch without my fix) |
Also pls add label after all "hacktoberfest-accepted" |
62d2b5e
to
d0d3bf5
Compare
d0d3bf5
to
03ee8ef
Compare
Thank you @proggga |
phpunit-wrapper has a problem
it's broken in WrapperRunner
phpunit reset global variables between runs
https://phpunit.readthedocs.io/en/9.3/fixtures.html#global-state
I've got problems with global state in phpunit and this fix helped me.
I tried to user WrapperRunner in my big project, and this helps
this fix prevent variables in phpwrapper (they all in global scope) from turning to null
(Also I removed assert here like in #539, I need this for passing all tests)