Problem/Motivation
As part of #3066512: Add checks for syntax and display of help topic Twig template files, we are adding a test that installs all the modules and themes, and then verifies that all help topics can be rendered. That test class is core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php.
As part of #3037230: Finalize the merge of Help Topics into Help, we wanted to move the test of help topic rendering into \Drupal\Tests\system\Functional\Module\InstallUninstallTest, in the assertHelp() method
That method is currently verifying that modules and themes implementing hook_help (which we'll be removing/deprecating someday but now required to pass doc-gate), and it should instead verify that all of the help topics for that module can be viewed. We'll need additional tests to do the same for themes and install profiles, which cannot have hook_help but can have help topics. I haven't yet investigated where those should live.
There was intent to unify discovery of enabled modules but core now using module_list
Proposed resolution
Just remove the TODO as it makes no sense to merge tests until fate of hook_help() in #3031642: Deprecate hook_help() and combine with Topics
Outdated suggestion was
I think we need to do the following:
a) As in the current HelpTopicsSyntaxTest, with all the core modules and themes installed, run the syntax checks on all the help topics that exist. This will ensure correct syntax of all of the topics, and also that all the Related topics links exist.
b) With a given module, its dependencies, and the core required modules being the only modules installed, verify that all of the module's topics can still be viewed (same for themes). This will make sure that we aren't relying on another module/theme somehow that isn't actually a dependency, such as trying to make a link to a route that doesn't exist unless a certain module is installed... This may not be necessary if #3090659: Make a way for help topics to generate links only if they work and are accessible is taken care of.
Remaining tasks
patch/review/commit
User interface changes
no
API changes
no
Data model changes
no
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3074040-15.patch | 838 bytes | andypost |
Comments
Comment #3
jhodgdonAdding some additional details of what I think we should test and how.
Comment #9
smustgrave commentedThis appears to have already been done. If someone could confirm.
I'm no longer seeing a file HelpTopicsRenderTest.php and help testing appears to be in InstallUninstallTest
Comment #12
andypostGonna check it as help topics are merged to help module
Comment #13
andypostThere's still TODO in
HelpTopicsSyntaxTestso the issue still actionableComment #14
andypostsummary outdated, still makes sense to check supplied topics in common test which installs every module
Comment #15
andypostThere's
\Drupal\Tests\system\Functional\Module\InstallUninstallTest::assertHelpwhich is checking requiredhook_help()implementation for core modules.I think we should leave the test as is because
- it's purpose to do syntax checks of topics, which is unrelated to system module
- the test already self explaining but
InstallUninstallTestdoc-block is totally unclear and doing more then decumentedComment #16
smustgrave commentedFor the IS update.
Change you made looks simple enough.
Comment #17
andypostTrying to run tests locally
Second one can't complete (fails installing mysql as I'm using sqlite)
Comment #18
smustgrave commentedDon't mind marking this for you.
Comment #19
quietone commentedI looked at the patch and see that this is not moving a test. Setting back to needs work for a title update.
On the other hand the comment being removed states
As I read that it means that the intention was to test each module without other modules installed.
Looking at the history I find support of that interpretation.
The @todo comment was added in #3066512-15: Add checks for syntax and display of help topic Twig template files. The following comment in the issue states,
It does seem that this is to add more testing. Is there a reason not to add this level of testing?
Comment #20
andypostProper parent is #3031642: Deprecate hook_help() and combine with Topics
when we consider to require help topics instead of
hook_help()this action becomes doableComment #21
andypostComment #22
andypostComment #23
andypostThere's
GenericModuleTestBasenow