Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
help.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Apr 2015 at 11:35 UTC
Updated:
7 May 2015 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pwolanin commentedComment #2
wim leersComment #3
pwolanin commentedquick 1st pass.
Comment #4
pwolanin commentedNeed to figure out the regression test too
Comment #5
amateescu commentedThis was found while pair-profiling with @dawehner, adding a suggested commit message to the IS.
Comment #6
fabianx commentedNot sure how we can do that (regression test), but this would be RTBC from my side.
Maybe a sub-classed UrlGenerator inserted into the Container in a web test, then calling $moduleHandler->invokeAll('help')?
Comment #7
dawehnerHere is a test ... the image is a prove that it actually works.
Comment #8
dawehnerI'm sorry, totally forgot the actual files
Comment #10
jcnventuraThe regression test should be a static analysis that hook_help implementations should only have whitespace (or comments) between the opening bracket and the switch statement. It is pointless to guard against each possible mistake.
I've created a coder code sniffer feature request about that.
Comment #11
amateescu commentedI think we're testing that there's no routing activity, no?
The standard way to do this is a try / catch block with
$this->fail()and$this->pass():)Comment #12
dawehnerMuh.
@amateescu took back point 2.
Comment #13
wim leers:D
Seems unrelated?
Other than that, looks ready.
Comment #14
dawehnerWell, a) its the right thing to do, certainly b) its causing failures in the kernel test, if you don't check it.
Comment #15
wim leersAlright, then this is ready!
Comment #16
amateescu commentedI agree, RBTC +1 :)
Comment #17
fabianx commentedRTBC++
Comment #18
catchThis needs a comment in hook_help() to explain why we build the links in two places. The test will stop a patch from getting committed, but I can see it being confusing and people trying to revert this.
Comment #19
wim leersComment added.
Comment #21
catchLooks like Alex got this one.
Comment #23
tim.plunkettThanks testbot.
Comment #24
znerol commentedTiny follow-up #2476745: Fix case of SuperNovaGenerator in HelpEmptyPageTest