Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
navigation.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jul 2025 at 14:58 UTC
Updated:
30 Sep 2025 at 07:39 UTC
Jump to comment: Most recent
Comments
Comment #3
jurgenhaasComment #4
smustgrave commentedSmall change but could we add an assertion to an existing test
Comment #5
jurgenhaasI've added a test for this and it seems to be working OK. But the pipeline shows a PhpUnit error, I couldn't find out, though, what's wrong. The one failing test I found is scaffolding related and that isn't related to the MR.
I probably need some assistance in finding out what else is going wrong, if anything.
Comment #6
smustgrave commentedCan you re run?
Comment #7
jurgenhaasOh, nice, that worked. Still a few tests running, but setting to NR since the relevant tests passed.
Comment #8
smustgrave commentedYea if they fail repeatedly in a row I’d say not random but we do have those random ones that popup
Comment #9
jurgenhaasBack to NW, there's still something wrong, need to look into this tomorrow.
Comment #10
jurgenhaasTests are now green, ready for review.
Comment #11
smustgrave commentedThanks for adding the test coverage
Ran the test-only feature
What happens though if there is no #attributes?
Comment #12
jurgenhaasNot sure why the test-only test fails, maybe it doesn't take all the provided changes into account? When the full test is being run, that test is green.
No change to how Drupal works without this MR. The twig code changes from
create_attribute()tocreate_attribute(link['#attributes']|default([])), so it adds an attribute if present or defaults to nothing, which is what is the default now as well.Does this require another test?
Comment #13
smustgrave commentedTest only fail is good shows the test coverage works
Comment #14
smustgrave commentedThat's what I get for having too many tabs open. I thought I saw ['#attributes'][another_key] I see now. yea |default([]) works.
That was my only comment, rest looks good
Comment #18
nod_Committed and pushed 61e09f28155 to 11.x and 8d86de67efe to 11.2.x. Thanks!