function LocalePluralFormatTest::setUp
Same name in other branches
- 9 core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::setUp()
- 8.9.x core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::setUp()
- 10 core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::setUp()
- 11.x core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::setUp()
Overrides DrupalWebTestCase::setUp
File
-
modules/
locale/ locale.test, line 794
Class
- LocalePluralFormatTest
- Tests plural index computation functionality.
Code
function setUp() {
parent::setUp('locale', 'locale_test');
$admin_user = $this->drupalCreateUser(array(
'administer languages',
'translate interface',
'access administration pages',
));
$this->drupalLogin($admin_user);
// Import some .po files with formulas to set up the environment.
// These will also add the languages to the system and enable them.
$this->importPoFile($this->getPoFileWithSimplePlural(), array(
'langcode' => 'fr',
));
$this->importPoFile($this->getPoFileWithComplexPlural(), array(
'langcode' => 'hr',
));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.