Skip to content

PhpUnit Bridge env variables set in phpunit.xml not available in parallel testsuites #28895

Closed
@alexander-schranz

Description

@alexander-schranz

Symfony version(s) affected: 4.1.5

Description

When I define env variables in the phpunit.xml.dist:

    <php>
        <env name="MY_ENV" value="Tests"/>
    </php>

the env are not available when giving a directory for run parallel testsuites:

How to reproduce

bin/simple-phpunit path
echo getenv('MY_ENV'); // false

The following works:

bin/simple-phpunit -c path/to/phpunit.xml.dist
echo getenv('MY_ENV'); // returns 'Tests'

EDIT Repository to reproduce the error: https://github.com/alexander-schranz/symfony-phpunit-test

Possible Solution

Currently not sure as I did not foundout how the parallel tests are done? see #28995

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions