class LocaleGetPluralDeprecationTest
Same name and namespace in other branches
- main core/modules/locale/tests/src/Kernel/LocaleGetPluralDeprecationTest.php \Drupal\Tests\locale\Kernel\LocaleGetPluralDeprecationTest
Tests deprecation of locale_get_plural().
Attributes
#[CoversFunction('locale_get_plural')]
#[Group('locale')]
#[IgnoreDeprecations]
#[RunTestsInSeparateProcesses]
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\Tests\DrupalTestCaseTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\PhpUnitCompatibilityTrait, \Prophecy\PhpUnit\ProphecyTrait, \Drupal\TestTools\Extension\DeprecationBridge\ExpectDeprecationTrait, \Drupal\Tests\BrowserHtmlDebugTrait, \Drupal\Tests\HttpKernelUiHelperTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\locale\Kernel\LocaleGetPluralDeprecationTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of LocaleGetPluralDeprecationTest
File
-
core/
modules/ locale/ tests/ src/ Kernel/ LocaleGetPluralDeprecationTest.php, line 16
Namespace
Drupal\Tests\locale\KernelView source
class LocaleGetPluralDeprecationTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'locale',
];
/**
* Tests deprecation of locale_get_plural().
*/
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.