This is a sub-task of #500866: [META] remove t() from assert message focused on the T-Z include files from the system module sub-systems (excluding system sub-system itself).

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 Theme, Update, Upgrade and Uuid sub-system tests for the above. There are approximately 98 changes needed spread out across 16 test files. This issue includes conversion of all format_patch() occurances as well.

Files: 
CommentFileSizeAuthor
#15 1797920-15-t-assert-T-Z.patch59.84 KBdcam
PASSED: [[SimpleTest]]: [MySQL] 40,316 pass(es).
[ View ]
#9 1797920-9-t-assert-T-Z.patch59.74 KBdcam
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1797920-9-t-assert-T-Z.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#5 1797920-5-t-assert-T-Z.patch46.31 KBLars Toomre
PASSED: [[SimpleTest]]: [MySQL] 42,806 pass(es).
[ View ]
#3 1797920-3-t-assert-T-Z.patch45.46 KBLars Toomre
PASSED: [[SimpleTest]]: [MySQL] 42,810 pass(es).
[ View ]
#1 t-assert-T-Z-1797920-1.patch46.06 KBLars Toomre
PASSED: [[SimpleTest]]: [MySQL] 41,702 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new46.06 KB
PASSED: [[SimpleTest]]: [MySQL] 41,702 pass(es).
[ View ]

Here is an initial untested patch for this issue. This patch includes format_string() conversions as well.

Per #1797318-5: Remove t() from asserts from Form sub-system tests, I was under the impression that escaped strings should use format_string(). @xjm thought it was not required. Hence, in this issue, I have simply removed the t() and not changed them to format_string(). Let's see what the bot thinks.

Those assert messages in this patch also might be worthy of a closer look in the review process. We also could convert some of them to double quoted strings and remove the escape character.

Status:Needs review» Needs work
Issue tags:+Needs reroll

#1 no longer applies due to changes in UpdateScriptTest.php, LanguageUpgradePathTest.php, and UpgradePathTestBase.php.

Status:Needs work» Needs review
Issue tags:-Needs reroll
StatusFileSize
new45.46 KB
PASSED: [[SimpleTest]]: [MySQL] 42,810 pass(es).
[ View ]

Attached is a re-roll of #1.

Status:Needs review» Needs work

I tested #3. I found one extra t() around an assert message in Upgrade/UuidUpgradePathTest.php, line 40. If that can be added, then I'll re-test and it can be RTBC.

Status:Needs work» Needs review
StatusFileSize
new46.31 KB
PASSED: [[SimpleTest]]: [MySQL] 42,806 pass(es).
[ View ]

Here is an updated patch that includes what looks like an added assert since this was first rolled weeks ago.

Thanks for the review @dcam.

Status:Needs review» Reviewed & tested by the community

I tested #5 and didn't find any more t()'s around assert messages. It looks good to me.

Assigned:Lars Toomre» jhodgdon

Version:8.x-dev» 7.x-dev
Assigned:jhodgdon» Unassigned
Status:Reviewed & tested by the community» Patch (to be ported)

Thanks, committed to 8.x and ready for backport.

Status:Patch (to be ported)» Needs review
StatusFileSize
new59.74 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1797920-9-t-assert-T-Z.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Backported #5 to D7.

#9: 1797920-9-t-assert-T-Z.patch queued for re-testing.

#9: 1797920-9-t-assert-T-Z.patch queued for re-testing.

Issue tags:+Novice

Tagging as Novice.

Issue tags:-Novice

#9: 1797920-9-t-assert-T-Z.patch queued for re-testing.

Status:Needs review» Needs work
Issue tags:+Novice

The last submitted patch, 1797920-9-t-assert-T-Z.patch, failed testing.

StatusFileSize
new59.84 KB
PASSED: [[SimpleTest]]: [MySQL] 40,316 pass(es).
[ View ]

Rerolled #9.

Status:Needs work» Needs review

Status...

Status:Needs review» Reviewed & tested by the community

Hi,
#15 seems good for me.
Thanks

Status:Reviewed & tested by the community» Fixed

Thanks again! Committed to 7.x.

Automatically closed -- issue fixed for 2 weeks with no activity.

Issue summary:View changes

Updated initial change counts.