phpunit
phpunit copied to clipboard
allow configuring extensions within the testsuite block
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.