Problem/Motivation
We have suffered numerous regressions in hook_help(), and issues like #2183113: Update hook_help signature to use route_name instead of path have made that all the more glaring.
Proposed resolution
Devise a way to sanely and automatically test hook_help()
Remaining tasks
Figure out how to do that
User interface changes
N/A
API changes
N/A
Comments
Comment #1
sunThe mere existence of this issue means that the existing (wildcard)
HelpTestis useless, because it does not actually assert anything, despite enabling most core modules.In turn, #2254185: Remove Drupal\help\Tests\HelpTest can be re-purposed to remove that test.
The maximum I could foresee for this issue here would be a test or test base class that
$module.routing.yml.$module.module.$module_help().Comment #2
effulgentsia commentedRaising to Major given that there is help text on many many pages and testing each one manually is tedious.
Comment #3
dawehnerWe actually have a test now which enables each modules separately and checks whether hook_help() works. Given that I think this covers the issue.
See
\Drupal\help\Tests\HelpTest::verifyHelpComment #4
jhodgdonWell. verifyHelp() actually does not do what is stated in #3. It just finds the list of currently enabled modules with hook_help() implementations, and verifies that they don't have double-escaping and some other stuff, which is good. It also verifies help permissions.
#2488032: Integrate help test into module uninstall test is actually attempting to do what is stated in #3, which is verifying that each module's help works without other non-required modules being enabled.