You are here

public function StringTranslationTraitTest::testFormatPlural in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 59
Contains \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest.

Class

StringTranslationTraitTest
@coversDefaultClass \Drupal\Core\StringTranslation\StringTranslationTrait @group StringTranslation

Namespace

Drupal\Tests\Core\StringTranslation

Code

public function testFormatPlural() {
  $method = $this->reflection
    ->getMethod('formatPlural');
  $method
    ->setAccessible(TRUE);
  $this
    ->assertEquals('apples', $method
    ->invoke($this->translation, 2, 'apple', 'apples'));
}