It seems that not having t() in assertions is a convention as for #500866: [META] remove t() from assert message.

We could remove it from all these assertions #500866-42: [META] remove t() from assert message.

But let's be careful #500866-96: [META] remove t() from assert message with it :)

Submitting this as "feature request" because we may don't need it right now.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Category: feature » task
Issue tags: +low-hanging fruit

Tagging.

joshmiller’s picture

FileSize
183.43 KB

Used the following to create this patch:

perl -pi -e "s|\\\$this->assert(.*), t\\((['\"])(.*)(['\"])\\)\\);|\\\$this->assert\\1, \\2\\3\\4);|" $(egrep -rl '\$this->assert.*, t\(.*\)\);' modules)
git diff --no-prefix >~/Desktop/test.patch

It actually looks good to me... it leaves the t() functions alone that have text replacements. I think replacing the t()'s that also santize is what derailed the core conversation.

Take a look, comments welcome.

joshmiller’s picture

Status: Active » Needs review

The last submitted patch, remove-t-1380620-2.patch, failed testing.

msti’s picture

Issue summary: View changes
FileSize
182.75 KB
msti’s picture

Status: Needs work » Needs review

re-rolled the patch