This is a sub-task of #500866: Simpletest: remove t() from assert message focused on the Entity sub-system.
In D8 per http://drupal.org/simpletest-tutorial-drupal7#t, best practice is to remove t() from assert messages in tests. When necessary, t() should be replaced with format_string().
This issue is to correct the Entity sub-system tests for the above. There are approximately 120 changes needed. This is a smaller patch than others to faciliate backport to D7. It will be a bit tricky to review because many of the message strings appear as the second to last parameter rather than as the last one.
Comment | File | Size | Author |
---|---|---|---|
#10 | entity-1797220-10.patch | 51.29 KB | dcam |
#6 | 1797220-6-t-entity.patch | 49.73 KB | Lars Toomre |
#1 | t-assert-entity-1797220-1.patch | 51.18 KB | Lars Toomre |
Comments
Comment #1
Lars Toomre CreditAttribution: Lars Toomre commentedHere is an initial untested patch for this issue.
Comment #2
xjmYes, very glad you caught this. It was this particular irregularity that kept us from finishing these in July.
Comment #3
xjmThanks @Lars Toomre. Two things:
Really too bad, don't you think? ;) But, if we're changing can't to cannot, then cannot needs to be one word. Can not has a different meaning. Personally, I'd forego this word change, leave the message as it is, and leave the double quotes.
These changes are out of scope and should be removed. Edit: Reference: http://webchick.net/please-stop-eating-baby-kittens
Also, could you clarify your point about backport from the summary?
Edit 2: Please include an interdiff when updating the patch, since everything aside from these things looked to be correct.
Comment #4
Lars Toomre CreditAttribution: Lars Toomre commentedI will have to figure out how to the correct interdiff @xjm. I will try in the morning.
Comment #5
Lars Toomre CreditAttribution: Lars Toomre commentedI am having git problems trying to get the patch in #1 to apply locally. My git skills are not the best so it probably is something I am doing wrong.
It appears that there has been a change to EntityTranslationTest.php in the interim. If not addressed by others, I will come back to this after rolling updates for other comments in this initiative.
Comment #6
Lars Toomre CreditAttribution: Lars Toomre commentedHere is the revised patch that addresses #3. I am having problems generating an interdiff because the $message lines noted in #3 were removed by an external patch in the interim.
Comment #7
xjmReviewed this locally again. Looks good. Thanks @jhodgdon for suggesting adding
--unified=0
to the diff command locally; that makes it even easier to scan.Comment #8
jhodgdonPatch in #6 is committed to 8.x. Can someone review 8.x and make sure it's all taken care of? Meanwhile, moving to 7.x on the assumption that it is.
Comment #9
jhodgdonComment #10
dcam CreditAttribution: dcam commentedBackported #6 to D7.
Comment #11
dcam CreditAttribution: dcam commented#10: entity-1797220-10.patch queued for re-testing.
Comment #12
dcam CreditAttribution: dcam commentedTagging as Novice.
Comment #13
izus CreditAttribution: izus commented#10: entity-1797220-10.patch queued for re-testing.
Comment #14
izus CreditAttribution: izus commentedHi,
the patch seems ok
Thanks
Comment #15
jhodgdonThanks again -- committed to 7.x.