Do not use t() for the assert messages

Created on 28 July 2024, 12 months ago
Updated 11 August 2024, 11 months ago

Similarly to what done in Drupal core tests, the assert messages should not be translatable.

AccessDeniedTestCase

$this->assertText($node->title, 'Found the custom 403 page');
// Logout and check that the user login block is shown on custom 403 pages.
$this->drupalLogout();
$this->drupalGet('admin');
$this->assertText($node->title, 'Found the custom 403 page');

CacheIsEmptyCase

$this->assertTrue(cache_is_empty($this->default_bin), 'The cache bin is empty');

The last class code is not very consistent, since it translates the messages for its own assert methods.

📌 Task
Status

Fixed

Version

1.0

Component

Tests

Created by

🇮🇹Italy apaderno Brescia, 🇮🇹

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024