NoHelpTest is designed to look at admin/help and verify that there is NO help link for a module that doesn't implement hook_help().

But NoHelpTest uses the 'testing' profile, and in the testing profile the help module is not enabled! Thus admin/help never shows anything - indeed if you run the test interactively you'll see that visiting admin/help produces a 404 Page not found. There will NEVER be any help links on admin/help in the testing profile without the help module enabled, and this test will always run green even if the help module is broken.

To fix this, we need to enable the help module in the test.
To make sure this doesn't break again, we also have to check for a 200 response when requesting admin/help and check that we are really seeing the correct page by verifying the presence of some known text on that page.

Patch attached.

CommentFileSizeAuthor
help.patch1.02 KBTR
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Makes sense, can you upload a test-only patch that only contains the failures and proves that this fixes it?

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Rather than asking for a different patch, I ran the "no help" test manually without and then with the patch, with debugging output turned on.

I have confirmed that without the patch, the line
$this->drupalGet('admin/help');
goes to a 404, as noted in the issue here, and the test "passes" because there is no help text on that page at all.

I have also confirmed that with the patch, the drupalGet goes to the actual help page, and so the test is now valid.

So, having manually tested the patch, I think it is ready to go in.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

So would you say then that NoHelpTest is.... no help? ;)

CSI image of dude taking off his glasses and then YEAAAHHH over a city skyline

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.