1 year ago

#69447

test-img

MyNameIsLinuxx

PHPUnit "Unknown option "--configuration" Process finished with exit code 1" in PhpStorm

I am able to execute unit tests in the CLI using the following command:

/usr/local/Cellar/php@7.4/7.4.27/bin/php /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/vendor/phpunit/phpunit/phpunit /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/tests

However, i want to fire the tests from inside PhpStorm, but the IDE is automatically adding parameters to the executing command which causes an instant execute fail:

/usr/local/Cellar/php@7.4/7.4.27/bin/php /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/vendor/phpunit/phpunit/phpunit --configuration /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/phpunit.xml /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/tests --teamcity
Testing started at 11:51 ...
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Unknown option "--configuration"

Process finished with exit code 1

When i disable the "Default configuration file" checkbox in Preferences > PHP > Test Frameworks > {current project config} - it says:

Unknown option "--no-configuration"

Process finished with exit code 1

Is there a way to disable the configuration parameter at all? I'm pretty new to unit tests and i don't even know which purpose this configuration file would even has...

I hope someone can help me - thanks in advance !!

unit-testing

phpunit

phpstorm

0 Answers

Your Answer

Accepted video resources