This is a sub-task of #500866: [META] remove t() from assert message focused on the Xmlrpc module.
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().
There are approximately 8 changes needed in two test files. This issue includes conversion of all format_patch() occurances as well.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | xmlrpc-1798390-7.patch | 3.21 KB | dcam |
| #5 | xmlrpc-1798390-5.patch | 3.34 KB | dcam |
| #1 | 1798390-1-t-xmlrpc.patch | 4.05 KB | lars toomre |
Comments
Comment #1
lars toomre commentedHere is an initial patch for this issue. It includes a couple of changes to format_string as I recall. Also be careful in reviewing as some assertions look odd from afar.
Comment #2
xjmI checked in XmlRpcBasicTest::testInvalidMessageParsing(). Here's how that array of messages is used:
So that change looks correct to me.
Out of scope here, but I think this should use
assertTrue()rather thanassert()for clarity. (See TestBase::assert().) Can we file a followup novice issue for that?All the changes are correct, so RTBC.
Comment #3
jhodgdonThanks for the explanation in that review xjm. :) This is committed to 8.x.
REMINDER to file that follow-up issue on assertTrue vs assert() mentioned in #2.
Comment #4
jhodgdonComment #5
dcam commentedBackported #1 to D7.
Comment #7
dcam commentedOops, deleted an extra ')'. It's strange that it passed the tests locally.
Comment #8
dcam commented#7: xmlrpc-1798390-7.patch queued for re-testing.
Comment #9
dcam commentedTagging as Novice.
Comment #10
izus commented#7: xmlrpc-1798390-7.patch queued for re-testing.
Comment #11
izus commentedhi,
the patch seems good :)
Thanks
Comment #12
dcam commentedThanks for the review, izus!
Comment #13
jhodgdonThanks all! Committed to 7.x. Another one bites the dust!
Comment #14.0
(not verified) commentedAdded count numbers.