function StringTranslationTraitTest::testT
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest::testT()
- 8.9.x core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest::testT()
- 11.x core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest::testT()
@covers ::t
File
-
core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ StringTranslationTraitTest.php, line 51
Class
- StringTranslationTraitTest
- @coversDefaultClass \Drupal\Core\StringTranslation\StringTranslationTrait @group StringTranslation
Namespace
Drupal\Tests\Core\StringTranslationCode
public function testT() : void {
$invokableT = new \ReflectionMethod($this->testObject, 't');
$result = $invokableT->invoke($this->testObject, 'something');
$this->assertInstanceOf(TranslatableMarkup::class, $result);
$this->assertEquals('something', $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.