This is a feature request for a way to mark a class to be run in a separate process. This would be a step between having each test run in its own process and the default of having everything run in the same process.
This is most interesting when using separate processes for a technical reason (e.g. I'm testing code that generates php classes) and inheritance is involved. The idea is that it's often much easier to make sure no two tests within the same class run into problems (e.g. not reusing class names for the generated classes between tests) than to make sure the same test run by different children doesn't run into problems (here, it would be working get_class($this) into the class names for generated classes). While the latter is often possible, it will often lead to much less readable code.
The benefit of using this would be in the fact that the performance penalty a process per class incurs is much less severe than the performance penalty for a process per test, especially when taken relative to the amount of time spent running the actual tests.
This is a feature request for a way to mark a class to be run in a separate process. This would be a step between having each test run in its own process and the default of having everything run in the same process.
This is most interesting when using separate processes for a technical reason (e.g. I'm testing code that generates php classes) and inheritance is involved. The idea is that it's often much easier to make sure no two tests within the same class run into problems (e.g. not reusing class names for the generated classes between tests) than to make sure the same test run by different children doesn't run into problems (here, it would be working
get_class($this)into the class names for generated classes). While the latter is often possible, it will often lead to much less readable code.The benefit of using this would be in the fact that the performance penalty a process per class incurs is much less severe than the performance penalty for a process per test, especially when taken relative to the amount of time spent running the actual tests.