function PluralTranslatableMarkupTest::testMissingPluralTranslation

Same name in other branches
  1. 11.x core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php \Drupal\Tests\Core\StringTranslation\PluralTranslatableMarkupTest::testMissingPluralTranslation()

Tests when the plural translation is missing.

File

core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php, line 49

Class

PluralTranslatableMarkupTest
Tests the TranslatableMarkup class.

Namespace

Drupal\Tests\Core\StringTranslation

Code

public function testMissingPluralTranslation() : void {
    $markup = PluralTranslatableMarkup::createFromTranslatedString(2, 'There is no plural delimiter @count');
    $this->assertEquals('There is no plural delimiter 2', $markup->render());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.