diff --git a/core/modules/locale/src/Tests/LocalePluralFormatTest.php b/core/modules/locale/src/Tests/LocalePluralFormatTest.php index c0e9041..64af8cd 100644 --- a/core/modules/locale/src/Tests/LocalePluralFormatTest.php +++ b/core/modules/locale/src/Tests/LocalePluralFormatTest.php @@ -37,6 +37,18 @@ protected function setUp() { } /** + * Tests serialization of PluralTranslatableMarkup(). + */ + public function testPlurialTranslatableMarkupSerialization() { + // Tests with singular and plural values. + foreach ([1, 2] as $value) { + $markup = new PluralTranslatableMarkup($value, 'singular @count', 'plural @count'); + $serialized_markup = unserialize(serialize($markup)); + $this->assertIdentical($markup->render(), $serialized_markup->render()); + } + } + + /** * Tests locale_get_plural() and \Drupal::translation()->formatPlural() * functionality. */