phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

allow configuring extensions within the testsuite block

Open arderyp opened this issue 3 years ago • 0 comments

I have a custom extension that I only want used/enabled for one particular (non-default) testsuite. Right now, extensions are enabled at the top level (parent element <phpunt>), which means the extension is enabled for all tests in all testsuites. I am working around this by examining $argv to see if --testsuite=TARGET or if a specific test file from the target testsuite's subdirectory is passed in. If I detect I am not within the target testsuite based on $argv, I have the extension do nothing. This is obviously a less than ideal approach though, and there are likely edge cases I am missing.

arderyp avatar May 18 '22 20:05 arderyp