Found it out! Go to "Run" and select "Edit Configurations". Then on the bottom left corner, click "Edit configuration templates..." In there, select "PHPUnit" on the left. On the right you can now enter additional run parameters in the "Test Runner options" field.
Nov 6, 2022
1
Level 17
PHPStorm / PHPUnit - How to add default parameters to 'Run context configuration'
PHPStorm offers the ability to run a single test or a whole class by clicking the play-button on the left of the method name and then "Run '...'". For this it uses a temporary run configuration for this specific test or the whole class.
What I would like to do is by default always add more parameters the the phpunit call which gets executed. The only solution I have found so far is to create a run configuration and then manually select and run this. But this does not allow me to use the handy keyboard shortcut to run the test/class, in which my cursor currently is.
So does anybody know: Is there a global setting for 'Run context configuration'?
Level 17
Please or to participate in this conversation.