Skip to content

[PhpUnitBridge] Read --configuration directive #34300

@ro0NL

Description

@ro0NL

When running unit tests from within PhpStorm, i've run into an issue wherer the current working directory is controlled by PhpStorm (it switches to where the test is located).

This effectively breaks

if (file_exists('phpunit.xml')) {
$phpunitConfigFilename = 'phpunit.xml';
} elseif (file_exists('phpunit.xml.dist')) {
$phpunitConfigFilename = 'phpunit.xml.dist';

meaning my custom SYMFONY_PHPUNIT_VERSION is not detected.

PhpStorm invokes phpunit with the --configuration directive

/usr/bin/php /project/bin/phpunit \
  --bootstrap /project/config/bootstrap.php \
  --configuration /project/phpunit.xml.dist

Would be super cool if we detect --configurtation in the simple-phpunit wrapper to make it smooth :)

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