Proposal - add testSetup hook
I am having a problem with test interoperability. I have an extension that other extensions can hook into (by virtue of having an api with a particular action).
The issue appears in unit tests. On the main extension test it will call the code in the other extension as it would in production. However, there are some specific set up actions required for testing on other extension that happen in it's own tests but not, currently, in the main extension's test runs.
My best idea for this is to have a hook that sits in core called civicrm_testSetup & which could be called from the setup function in a unit test.
I did think about using the existing Config hook - but we run these tests under the Drupal CMS rather than under the Unit tests CMS so I'm not sure how we would identify it's a test. There is also something a bit odd about putting test concerns in the main config function.
I also thought about just putting the hook in my extension - but it seems that I would quickly want to add it to more than one extension - hence I think core maybe makes sense