You are here

public function TranslationWrapperTest::testTranslationWrapper in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php \Drupal\Tests\Core\StringTranslation\TranslationWrapperTest::testTranslationWrapper()

@covers ::__construct @group legacy

File

core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php, line 21

Class

TranslationWrapperTest
Tests the TranslationWrapper class.

Namespace

Drupal\Tests\Core\StringTranslation

Code

public function testTranslationWrapper() {
  $this
    ->expectDeprecation('Drupal\\Core\\StringTranslation\\TranslationWrapper is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. Use the \\Drupal\\Core\\StringTranslation\\TranslatableMarkup class instead. See https://www.drupal.org/node/2571255');
  $object = new TranslationWrapper('Deprecated');
  $this
    ->assertInstanceOf(TranslatableMarkup::class, $object);
}