Running tests with process isolation does not allow defining auto_prepend_file for child processes #5860
Labels
feature/process-isolation
Issues related to running tests in separate PHP processes
feature/test-runner
CLI test runner
type/bug
Something is broken
When running tests like this:
php -d auto_prepend_file=foo.php vendor/bin/phpunit
thefoo.php
file will not be loaded for the childphp
processes i.e. for each test case.What is expected
foo.php
to be loaded for each test case in the suite.What actually happens
foo.php
is not loaded because "-d auto_prepend_file" is not passed over to the child processes.Versions affected
Both latest 10.x and 11.x are affected. Did not check in 9.x.
Sample code
https://github.com/azabolotnyi/phpunit-testcases
Notes
Using
<ini>
inphpunit.xml
has no effect either, becauseauto_prepend_file
can't be affected byini_set()
- and that's how<ini>
values are set by PHPUnit.Possible solution
Capture
-d
parameters from the parentphp
process and pass them into theSeparateProcessTestRunner
.Composer info
The text was updated successfully, but these errors were encountered: