function LocalePluralFormatTest::testGetPluralFormat

Same name in other branches
  1. 9 core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::testGetPluralFormat()
  2. 8.9.x core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::testGetPluralFormat()
  3. 10 core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::testGetPluralFormat()
  4. 11.x core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::testGetPluralFormat()

Tests locale_get_plural() functionality.

File

modules/locale/locale.test, line 800

Class

LocalePluralFormatTest
Tests plural index computation functionality.

Code

function testGetPluralFormat() {
    $this->drupalGet('locale_test_plural_format_page');
    $tests = _locale_test_plural_format_tests();
    $result = array();
    foreach ($tests as $test) {
        $this->assertPluralFormat($test['count'], $test['language'], $test['expected-result']);
    }
}

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