protected function LocaleUpdateTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Functional/LocaleUpdateTest.php \Drupal\Tests\locale\Functional\LocaleUpdateTest::setUp()
- 9 core/modules/locale/tests/src/Functional/LocaleUpdateTest.php \Drupal\Tests\locale\Functional\LocaleUpdateTest::setUp()
File
- core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateTest.php, line 23
Class
- LocaleUpdateTest
- Tests for updating the interface translations of projects.
Namespace
Drupal\Tests\locale\FunctionalCode
protected function setUp() : void {
parent::setUp();
$module_handler = \Drupal::moduleHandler();
$module_handler
->loadInclude('locale', 'inc', 'locale.compare');
$module_handler
->loadInclude('locale', 'inc', 'locale.fetch');
$admin_user = $this
->drupalCreateUser([
'administer modules',
'administer site configuration',
'administer languages',
'access administration pages',
'translate interface',
]);
$this
->drupalLogin($admin_user);
// We use German as test language. This language must match the translation
// file that come with the locale_test module (test.de.po) and can therefore
// not be chosen randomly.
$this
->addLanguage('de');
}