You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My run_phpunit.php basically runs the test(s), prints the output, and returns a proper return code (would be "1" if tests fail).
I confirm that it's definitely returning the right error code.
The problem I have with this is that if there are tests that fail, I'm still seeing a green success icon:
After several experiments, I realized that as long as the output contains "FAILURES!", the test will be successful.
run_phpunit.php:
echo "FAILURES!";
exit(1);
run_phpunit.php:
echo "SUCCESS!";
exit(1);
I'm using testdox="true" in my phpunit.xml, btw.
Somehow, it appears to me that this extension is looking at the output, rather than relying on the exit code,
and there's a bug in the way it looks at the output.
To fix this, I'm changing my run_phpunit.php so that if there are failures, it will replace "FAILURES!" with something else...
I run PHPUnit in Docker (I develop on Windows), with these settings:
Workspace settings:
packages.json:
"build-runtests": "gulp build-debug && docker-compose run --rm --entrypoint 'php' myapp /opt/app/myapp/tests/run_phpunit.php",
My
run_phpunit.php
basically runs the test(s), prints the output, and returns a proper return code (would be "1" if tests fail).I confirm that it's definitely returning the right error code.
The problem I have with this is that if there are tests that fail, I'm still seeing a green success icon:
After several experiments, I realized that as long as the output contains "FAILURES!", the test will be successful.
run_phpunit.php:
run_phpunit.php:
I'm using
testdox="true"
in my phpunit.xml, btw.Somehow, it appears to me that this extension is looking at the output, rather than relying on the exit code,
and there's a bug in the way it looks at the output.
To fix this, I'm changing my
run_phpunit.php
so that if there are failures, it will replace "FAILURES!" with something else...run_phpunit.php:
The text was updated successfully, but these errors were encountered: