I have a Unit test where I need to print a string so I decide to use the t() function to translate it:
$this->assertTrue(is_numeric($expected), t('Parameter is numeric.'));
But the problem is that in the Unit test the
t() function is not available. So I decide to check a similar Unit test in core (SortArrayTest) and the test don't translate the string:
$this->assertTrue(is_numeric($expected) && is_numeric($result), 'Parameters are numeric.');
I know that at this moment Drupal don't have integration with the Unit test from the UI, but this can be possible in future, so:
Should I translate string inside a Unit test? If the answer is Yes, How I can do it?