function StringTranslationTraitTest::testFormatPlural
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest::testFormatPlural()
- 10 core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest::testFormatPlural()
- 11.x core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest::testFormatPlural()
@covers ::formatPlural
File
-
core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ StringTranslationTraitTest.php, line 62
Class
- StringTranslationTraitTest
- @coversDefaultClass \Drupal\Core\StringTranslation\StringTranslationTrait @group StringTranslation
Namespace
Drupal\Tests\Core\StringTranslationCode
public function testFormatPlural() {
$method = $this->reflection
->getMethod('formatPlural');
$method->setAccessible(TRUE);
$result = $method->invoke($this->translation, 2, 'apple', 'apples');
$this->assertInstanceOf(PluralTranslatableMarkup::class, $result);
$this->assertEquals('apples', $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.