Closed (fixed)
Project:
Drupal core
Version:
8.1.x-dev
Component:
system.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Feb 2016 at 15:46 UTC
Updated:
18 Jul 2016 at 20:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bès commentedHere is a first patch that add a failing test demonstrating that hook_link_alter is not working.
Comment #3
bès commentedSet to Needs review to have the test bot show the failing test.
Comment #4
bès commentedHere is a patch that fix the test and make the altered data used by the code.
Comment #5
bès commentedGood version of the patch with the fix and the test in the same file.
Comment #7
dawehnerThis is indeed a problem. What about fixing it like this, which would be IMHO a bit easier to read at the end of the day?
Comment #8
chx commentedTwo suggestions
$this->getMock('\Drupal\Core\Routing\UrlGenerator', array(), array(), '', FALSE, TRUE, TRUE); use the mock builder please
$options['url'] = (new Url('test_route_1'))->setUrlGenerator($this->urlGenerator);
the fewer references we use the better ; although of course the closure needs &$options but further referencing is unnecessary.
Comment #10
fabianx commentedRTBC - except for stylistic fixes needed.
Comment #11
bès commentedHere is an update of the tests with the fixes suggested by chx that shows the failing tests when the code is not fixed
Comment #12
bès commentedand the patch with the same test plus the fix.
Comment #14
fabianx commentedRTBC
Comment #15
catchNeeds a re-roll for 8.2.x
Comment #16
hazaJust re-rolling against 8.2.x
Comment #17
fabianx commentedBack to RTBC
Comment #19
catchCommitted/pushed to 8.2.x, thanks!
The 8.1.x patch no longer applies either, so this will need a re-roll for that too.
Comment #20
bès commentedPatch on #12 apply without warning on the 8.1.x branch for me. I don't know what to do.
Comment #22
catchNo you're right, not sure what went wrong my end.
Committed/pushed to 8.1.x, thanks!