class TranslationWrapperTest
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php \Drupal\Tests\Core\StringTranslation\TranslationWrapperTest
Tests the TranslationWrapper class.
@coversDefaultClass \Drupal\Core\StringTranslation\TranslationWrapper
@group StringTranslation
Hierarchy
- class \Drupal\Tests\UnitTestCase uses \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\Core\StringTranslation\TranslationWrapperTest implements \Drupal\Tests\UnitTestCase
Expanded class hierarchy of TranslationWrapperTest
File
-
core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ TranslationWrapperTest.php, line 15
Namespace
Drupal\Tests\Core\StringTranslationView source
class TranslationWrapperTest extends UnitTestCase {
/**
* @covers ::__construct
* @group legacy
*/
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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.