Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The test cases on \Drupal\Tests\Core\Render\Element\HtmlTagTest have just a numeric key, which makes it hard to find which data set fails.
Follow up from #2694535: Support rect property and nested render arrays in html_tag for dynamic SVGs (#74)
Proposed resolution
Let's add a descriptive key to each one, so that this shows in the fail message making it easier to identify the failing data set.
Remaining tasks
Provide a patch, after #2694535: Support rect property and nested render arrays in html_tag for dynamic SVGs gets in
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff-2-5.txt | 2.41 KB | WidgetsBurritos |
#5 | 2889378-5.patch | 8.25 KB | WidgetsBurritos |
#2 | 2889378-2.patch | 5.72 KB | Manuel Garcia |
Comments
Comment #2
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedHere's a start. Attached patch depends on the changes from https://www.drupal.org/files/issues/2694535-71.patch, so it wont apply properly til that gets in.
Comment #3
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commented#2694535: Support rect property and nested render arrays in html_tag for dynamic SVGs is in, so we can now work on this.
Comment #4
WidgetsBurritos CreditAttribution: WidgetsBurritos at Rackspace commentedThe patch in #2 is missing names for
providerPreRenderConditionalComments()
. I'll update the patch.Comment #5
WidgetsBurritos CreditAttribution: WidgetsBurritos at Rackspace commentedComment #6
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedAh, good call @WidgetsBurritos, changes on #5 look good to me. I applied the patch and had a read of HtmlTagTest, all are covered now.
Comment #7
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedboldly RTBCing as this is simple enough...
Comment #8
Gábor HojtsyI see that @larowlan asked for naming these in #2694535: Support rect property and nested render arrays in html_tag for dynamic SVGs and @catch agreed. Can we clarify here why is naming these an improvement? Are we getting better fail messages?
Comment #9
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commented@Gábor Hojtsy yes that's indeed the motivation here. With this patch its a lot easier to identify the data set that failed (you get the key in the
$tags
array):With this patch:
Without it:
Comment #10
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedComment #12
Gábor HojtsyAll right, makes sense. Looks like those are the only changes made. Thanks!
#2694535: Support rect property and nested render arrays in html_tag for dynamic SVGs was 8.4 only, so not backported to 8.3 and it should not be.