Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 314030

Remove t() from assertion messages in tests

$
0
0

Problem/Motivation

Part of meta #500866: [META] remove t() from assert message.

The $message parameter of the assert methods read like this:

A message to display with the assertion. Do not translate messages: use format_string() to embed variables in the message text, not t().

Despite a number of issues being declared fixed a while ago a number of uses of t() have crept into the code.

The following grep targets these:

grep -rl "assert[A-Za-z]*(.* t('[^')]*'));" core/modules/

core/modules/comment/src/Tests/CommentValidationTest.php
core/modules/config/src/Tests/ConfigExportUITest.php
core/modules/config/src/Tests/ConfigImportUITest.php
core/modules/field/src/Tests/Migrate/d6/MigrateFieldTest.php
core/modules/file/src/Tests/DownloadTest.php
core/modules/file/src/Tests/Views/FileViewsFieldAccessTest.php
core/modules/language/src/Tests/LanguageSwitchingTest.php
core/modules/search/src/Tests/SearchNodeUpdateAndDeletionTest.php
core/modules/system/src/Tests/Database/UpdateComplexTest.php
core/modules/system/src/Tests/Entity/EntityTypeConstraintsTest.php
core/modules/system/src/Tests/Entity/EntityValidationTest.php
core/modules/system/src/Tests/Extension/ModuleHandlerTest.php
core/modules/system/src/Tests/File/StreamWrapperTest.php
core/modules/system/src/Tests/Form/ElementsLabelsTest.php
core/modules/system/src/Tests/Form/ElementsVerticalTabsTest.php
core/modules/system/src/Tests/Menu/BreadcrumbTest.php
core/modules/taxonomy/src/Tests/TermLanguageTest.php
core/modules/taxonomy/src/Tests/TermValidationTest.php
core/modules/taxonomy/src/Tests/Views/TaxonomyRelationshipTest.php
core/modules/update/src/Tests/UpdateContribTest.php
core/modules/update/src/Tests/UpdateCoreTest.php
core/modules/user/src/Tests/UserValidationTest.php
core/modules/user/src/Tests/Views/AccessPermissionTest.php
core/modules/views/src/Tests/Plugin/DisplayPageWebTest.php
core/modules/views_ui/src/Tests/CachedDataUITest.php
core/modules/views_ui/src/Tests/DisplayAttachmentTest.php

Proposed resolution

Supply patch.


Viewing all articles
Browse latest Browse all 314030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>