missing sent headers when 'RunInSeparateProcess' is used #6105
Labels
feature/process-isolation
Issues related to running tests in separate PHP processes
type/bug
Something is broken
Summary
Good day, @sebastianbergmann
Thank you for fixing this issue #6103
You have said there that it was executing for you once and it was just the print issue.
The output was fixed there and that's great, but the problem with headers still exists for me.
I have very small understanding of PHPUnit internals, so I will try my best to explain the problem.
I am using Xdebug for testing headers (specifically
xdebug_get_headers()
), and for some reason they are not properly sent (or not reported by xDebug) withRunInSeparateProcess
while using PHPUnit 11.x (PHPUnit 10.x is working fine! Very strange situation, considering that it printed output twice as 11.x did)Originally I thought that it somehow run test twice with headers and without, but after your output fix I am curious what is happening here now.
Current behavior
xdebug_get_headers()
return empty, while sent headers are expected to be there.My PHP setup is next
How to reproduce
1.php
and run it as
php 1.php
. It should outputI took example from https://xdebug.org/docs/all_functions#xdebug_get_headers
"minimum-stability": "dev"
tests/TestAnnotation4.php
composer require phpunit/phpunit:11.5.3 -W
./vendor/bin/phpunit tests/TestAnnotation4.php
NOTE! If you run it with the fix from #6103 you will see that output is fixed (it outputs int(1) once), but the issue with headers is still there.
Expected behavior
The expected behavior is that
xdebug_get_headers()
returns sent headers and not empty array.For example, in PHPUnit 10.x it works as expected and returns sent headers
that is what I expected before. It works correctly in PHPUnit 9.x with annotations too.
Best regards
The text was updated successfully, but these errors were encountered: