function TranslationManagerTest::testFormatPluralWithNonNumericCount
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php \Drupal\Tests\Core\StringTranslation\TranslationManagerTest::testFormatPluralWithNonNumericCount()
Tests that a non-numeric count is rejected rather than rendered.
File
-
core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ TranslationManagerTest.php, line 93
Class
Namespace
Drupal\Tests\Core\StringTranslationCode
public function testFormatPluralWithNonNumericCount() : void {
$this->expectException(\TypeError::class);
$this->translationManager
->formatPlural('not a number', 'Singular', '@count plural')
->render();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.