Problem/Motivation
Reduce confusion for testers by cleaning up some user-facing and internal labels (minor housekeeping cleanup)
At the code level, most of the tests have somewhat arbitrary @group annotations.
This inconsistency is also seen sometimes in core - (cf. System/system, Shortcut/shortcut) but it's not deliberate, just a messy oversight.

This is only really visible at the UI level when you try to use the site-based test suite runner ( /admin/config/development/testing ) but test groups can also be used as arguments to the CLI phpunit runner as well ( eg `phpunit --group 'Rules' ).
Proposed resolution
Re-label a few of the test 'groups' for consistent capitalization, plurals, and correct categories.
Based on core examples, and for consistency with the PHP object names, this looks like these should become CamelCase. "rules_conditions" -> "RulesCondition"
This will in some cases require thinking about useful names, and naming things is hard.
OR?
Should everything in the 'Rules' namespace just be grouped as 'Rules'?
...When in doubt, just ensure the @group is 'Rules'.
Patch will affect user-facing text in code comments and annotations only - so no functional changes should be expected, except in cases where someones CI system is already using the --group filter.
User interface changes
Interface seen at admin/config/development/testing will group the 'Rules' tests more sensibly.
Testers will be able to refer to these groups by label if running or choosing tests via CLI.
These changes only affect the developer experience for testing.
| Comment | File | Size | Author |
|---|---|---|---|
| Screen Shot 2017-09-29 at 3.52.29 PM.png | 31.93 KB | dman |
Comments
Comment #2
dman commentedApproach:
Generally,
anything in the functional tests (BrowserTestBase) should probably be called RulesUi.
anything lower-case 'rules' needs to become title case 'Rules'
Where sensible, additional sub labels may make sense. The each of the RulesAction and RulesCondition and RulesEvent tests (now singular) are already in convenient directories, so keep that pattern,
Gotcha:
RulesLoggerChannelTest was in @group 'Logger' - it doesn't seem conventional to be adding our tests under some other modules namespace, so I set it back to 'Rules'.
There was a stray @group inside one of the test objects functions AnnotationProcessingTest->testCheckConfiguration(), serving no purpose. Removed it.
Before patch:
After patch:
Pull request posted at https://github.com/fago/rules/pull/491
Comment #3
jonathan1055 commentedThis all looks good. I have tested the changes locally (via Github PR). The numbers are:
This matches with Travis build output
OK (281 tests, 934 assertions)Comment #4
fagoThat's a good improvement, thank you! Merged!