Follow-up to #697760: Replace getInfo() in tests with native phpDoc + annotations (following PHPUnit)
Objective
Test classes may declare multiple
@group
s now, but Simpletest only uses the first @group on discovery.The Simpletest UI needs to be updated to support multiple groups per test.
Affects both the web/UI table/list of tests as well as the CLI
run-tests.sh --list [group]
.
Proposed solution (Test discovery mechanism)
Modify TestDiscovery
so that it keeps an association between all group annotations and test classes/files.
Add a 'groups' key (plural) to the output of getTestInfo()
, so that multiple groups can be described while leaving the 'group' key to work the same as before.
Proposed solution (Web UI)
Moved to follow-up: #2858652: Support multiple @group test annotations in Simpletest UI
TestDiscovery
should still support the 'group' key in the same way, so BC can be preserved for the UI form.
Proposed solution (CLI)
- Allow the group parameter to find tests based on multiple @group annotations.