This is a sub-task of #500866: [META] remove t() from assert message focused on the File 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 File sub-system tests for the above. There are approximately 118 changes needed (including format_string() changes).
Comment | File | Size | Author |
---|---|---|---|
#10 | 1797296-10-t-file.patch | 106.02 KB | dcam |
#7 | 1797296-7-t-file.patch | 9.41 KB | Lars Toomre |
#5 | 1797296-5-t-file.patch | 8.26 KB | Lars Toomre |
#1 | t-assert-file-1797296-1.patch | 42.43 KB | Lars Toomre |
Comments
Comment #1
Lars Toomre CreditAttribution: Lars Toomre commentedHere is an initial untested patch for this issue. This patch includes format_string() conversions as well.
Comment #2
xjmI reviewed all the changes locally; looks good. Sorry @jhodgdon for another email. :)
Comment #3
jhodgdonThis one's in, thanks!
Comment #4
jhodgdonComment #5
Lars Toomre CreditAttribution: Lars Toomre commentedI was double checking all of the tests in the File system and see that a bunch were not included from one file: DirectoryTest.php. The attached patch converts those as well. I have confirmed that all other tests in File system are correct after this gets in.
Comment #6
dcam CreditAttribution: dcam commentedAll of the changes in #5 look good, but I found a couple of stray t()'s around assert messages in UnmanagedCopyTest.php, lines 42, 86. Maybe they were added by a recent commit, I don't know. If they can get taken care of, then I'll make sure to re-test.
Comment #7
Lars Toomre CreditAttribution: Lars Toomre commentedHere is a patch that builds on #5 and adds the two fixes from #6 as well. I am pretty sure both of those lines were changed in the past three weeks or so.
Comment #8
dcam CreditAttribution: dcam commentedThanks, @Lars Toomre! #7 looks good. I don't see any other t()'s in the system file tests.
Comment #9
jhodgdonThanks! This is committed. I guess back to 7.x for porting of one or more of the above 8.x patches?
Comment #10
dcam CreditAttribution: dcam commentedBackported #1 and #7 to D7.
Comment #11
dcam CreditAttribution: dcam commented#10: 1797296-10-t-file.patch queued for re-testing.
Comment #12
dcam CreditAttribution: dcam commentedTagging as Novice.
Comment #13
izus CreditAttribution: izus commented#10: 1797296-10-t-file.patch queued for re-testing.
Comment #14
izus CreditAttribution: izus commentedHi,
patch in #10 seems good for me
Thanks
Comment #15
jhodgdonThanks all! Committed to 7.x.