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.
Patch split from: http://drupal.org/node/336697
Tests should use a descriptive message about the assertion rather than the default. Plus: There is a duplicate assertion with the same test.
Comment | File | Size | Author |
---|---|---|---|
#56 | drupal-1195254-56-followup.patch | 811 bytes | David_Rothstein |
#50 | drupal-1195254-50.patch | 49.85 KB | tim.plunkett |
#50 | interdiff.txt | 9.28 KB | tim.plunkett |
#44 | taxonomy-test-cleanup-1195254-43.patch | 46.21 KB | trrroy |
#43 | drupal-1195254-40.patch | 46.88 KB | tim.plunkett |
Comments
Comment #1
oriol_e9gTests wording improve and duplicated assertion removed (patch line 83).
Comment #2
xjmThis will need a reroll.
Comment #3
droplet CreditAttribution: droplet commentedwow. I hope drupal also has change notices of such strings changes. only a DOT.. if guys working on LDO, they should re-translate all these string again...
Comment #4
xjm@droplet re: #3: This issue is not tagged for backport. Also, I'm fairly certain no one translates test assertions. In fact, there's an issue somewhere recommending people don't even use t() on them. It's just a cleanup...
Comment #5
kid_icarus CreditAttribution: kid_icarus commentedRe-rolled. This patch applies cleanly at commit d8a4854.
Comment #6
xjmThanks @kid_icarus!
The assertion message here is a little goofy. Let's rephrase this as:
Terms are deleted when the vocabulary is deleted.
Also, while we're cleaning these lines up, let's remove
t()
from the assertion message texts in the lines we are already changing. Reference:http://drupal.org/simpletest-tutorial-drupal7#t
Thanks!
Comment #7
underq CreditAttribution: underq commentedUpdate #5 with trying to fix #6 ;)
Comment #8
tim.plunkettThis should use format_string(), not t()
Otherwise I think this is ready to go!
Comment #9
kid_icarus CreditAttribution: kid_icarus commentedAddresses #8.
Comment #10
kid_icarus CreditAttribution: kid_icarus commentedComment #11
tim.plunkettLooks great!
Comment #12
underq CreditAttribution: underq commentedI think looks better ;)
Comment #13
tim.plunkettCan you post an interdiff? I read through the patch in #9 very closely, I'd rather just see the changes made.
Comment #14
underq CreditAttribution: underq commentedComment #15
oriol_e9gRemove t() functions in tests assertions it's good!
Comment #16
tim.plunkettRTBC seconded!
Comment #17
catchI missed this in the queue, and just committed taxonomy entities as classed objects which very likely breaks this. Sending for re-testing.
Comment #19
underq CreditAttribution: underq commentedI have reroll patch ;)
Comment #20
xjmThe following formatting changes are incorrect:
Comment #21
xjmSo the current task is to reroll this patch without the above changes. Thanks!
Comment #22
kid_icarus CreditAttribution: kid_icarus commentedRerolled, addressing #21.
Comment #23
xjm#22 looks good. Thanks @kid_icarus.
Attached just corrects the re-indented docblocks to use standard summaries and adds periods to a few of the (already updated) assertion messages that were missed.
This is RTBC. (I only made cosmetic changes.)
Comment #24
xjmAlso, despite my comment in #4... (I've learned a lot in the past four months.) This is an appropriate (and desirable) backport. None of these strings are actually translated in practice in D7, and it's better to keep the two codebases in line where possible.
Note that this issue should probably wait on thresholds and so might need a reroll again at some point before it goes in.
Comment #25
catch#23: taxonomy-cleanup-1195254-23.patch queued for re-testing.
Comment #26
catchThanks folks. Committed/pushed to 8.x. It'd be good to get rid of the UnitTest that's not a unit test in there as well, but doesn't need to be done here.
Moving to 7.x for backport, I agree it's better to keep the code bases as in sync as possible - makes future backports easier.
Comment #27
tim.plunkettRerolled.
The diffstat is off because there was a whole hunk that was indented wrong in D8 that is still correct in D7.
Comment #28
xjmDidn't I RTBC this backport already? Durr.
Comment #29
webchickThis looks good, but i'd like to hold it until after wednesday's release so we don't inadvertently break any other patches.
Comment #30
Berdir#27: drupal-1195254-27.patch queued for re-testing.
It's not going to apply anymore anyway :)
Comment #32
trrroy CreditAttribution: trrroy commentedpatch re-rolled
Comment #34
trrroy CreditAttribution: trrroy commentedtrying the re-roll again
Comment #35
trrroy CreditAttribution: trrroy commentedoops. syntax error in #34 is fixed in this one
Comment #37
trrroy CreditAttribution: trrroy commentedIt appears to me that the patch works but the test for duplicate machine name failed.
Comment #38
BerdirThere is no format_text() in Drupal 7....
Comment #39
Berdir@trrroy: The patch in #27 is using t(), is it possible that you re-rolled the wrong one?
Comment #40
trrroy CreditAttribution: trrroy commentedThat was a typo for 'format_string'. Too much blood in my coffeestream. Let's try this again.
Comment #41
trrroy CreditAttribution: trrroy commentedComment #42
BerdirShouldn't be format_string() either IMHO. Only test assertion messages should stop using t(), it still needs to be used for the actual strings that we are comparing against.
The patch in #27 was all good except the conflict because another issue was commited.
Comment #43
tim.plunkettIf it had been t() in the assertion message, it would be replaced with format_string(). But this is in the assertion itself, and should stay as t().
Comment #44
trrroy CreditAttribution: trrroy commentedYes, you're right. Thank for setting me straight, Berdir. Wow, messy noob attempt at reroll. I have a good feeling about this one.
Comment #45
tim.plunkettThe following all need to have t() restored to the first part of the assertion. It should only be removed from the message.
.
.
.
.
.
.
.
.
.
Comment #46
trrroy CreditAttribution: trrroy commentedI think patch #44 fixed all those issues in 45.
Comment #47
tim.plunkettMy #45 was a crosspost, #44 is RTBC.
Comment #48
xjmEr. The original patch at the beginning of this issue was to add periods to the assertion messages that were missing them, among other things. The periods keep disappearing in the rerolls.
Comment #49
xjmComment #50
tim.plunkettRight. Got those.
Comment #51
BerdirLooked over this again and compared it with the patch from #27. Looks good to me.
Comment #52
ZenDoodles CreditAttribution: ZenDoodles commented#50: drupal-1195254-50.patch queued for re-testing.
Comment #53
David_Rothstein CreditAttribution: David_Rothstein commented#50: drupal-1195254-50.patch queued for re-testing.
Comment #54
David_Rothstein CreditAttribution: David_Rothstein commented(Patch looks good; just want to make sure it still passes tests before committing.)
Comment #55
David_Rothstein CreditAttribution: David_Rothstein commentedCommitted to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/399cf0a
Comment #56
David_Rothstein CreditAttribution: David_Rothstein commentedBut actually, can we please fix this indentation bug (which the patch introduced) because it's driving me crazy :)
I think it's OK to RTBC my own D8 patch here.
Comment #57
webchickCommitted and pushed #56 to 8.x. :)
Comment #58
David_Rothstein CreditAttribution: David_Rothstein commentedI'm going to count that as an RTBC for Drupal 7 also :)
Committed the followup there too. http://drupalcode.org/project/drupal.git/commit/f7d5d80