diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php index d07d8031f5..c3b7bcfe99 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\Core\StringTranslation; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\StringTranslation\TranslationWrapper; use Drupal\Tests\UnitTestCase; @@ -19,7 +20,8 @@ class TranslationWrapperTest extends UnitTestCase { * @expectedDeprecation Drupal\Core\StringTranslation\TranslationWrapper is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead. See https://www.drupal.org/node/2571255 */ public function testTranslationWrapper() { - new TranslationWrapper('Deprecated'); + $object = new TranslationWrapper('Deprecated'); + $this->assertTrue($object instanceof TranslatableMarkup); } }