function LocaleGetPluralDeprecationTest::testLocaleGetPlural
Same name and namespace in other branches
- main core/modules/locale/tests/src/Kernel/LocaleGetPluralDeprecationTest.php \Drupal\Tests\locale\Kernel\LocaleGetPluralDeprecationTest::testLocaleGetPlural()
Tests deprecation of locale_get_plural().
File
-
core/
modules/ locale/ tests/ src/ Kernel/ LocaleGetPluralDeprecationTest.php, line 30
Class
- LocaleGetPluralDeprecationTest
- Tests deprecation of locale_get_plural().
Namespace
Drupal\Tests\locale\KernelCode
public function testLocaleGetPlural() : void {
$this->expectUserDeprecationMessage('locale_get_plural() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3590542');
// English has no imported translation, so the default formula is used.
$this->assertSame(1, locale_get_plural(2));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.