diff --git a/core/modules/field/src/Tests/Number/NumberFieldTest.php b/core/modules/field/src/Tests/Number/NumberFieldTest.php index d33c3ad..e9ee3d3 100644 --- a/core/modules/field/src/Tests/Number/NumberFieldTest.php +++ b/core/modules/field/src/Tests/Number/NumberFieldTest.php @@ -7,6 +7,7 @@ namespace Drupal\field\Tests\Number; +use Drupal\Component\Utility\Html; use Drupal\Component\Utility\Unicode; use Drupal\simpletest\WebTestBase; @@ -497,9 +498,11 @@ function testNumberFormatter() { $this->drupalGet('node/' . $node->id()); + // Because of the @count placeholder in the 'format_plural_values' setting + // we need to check for the escaped value and not the raw one. $integer_formatted = number_format($random_integer, 0, '', $thousand_separator); $format_plural = $integer_formatted . ' item' . ($random_integer == 1 ? '' : 's'); - $this->assertRaw($format_plural, 'Random integer formatted'); + $this->assertEscaped($format_plural, 'Random integer formatted'); } /**