function EntityTranslationFormTest::setUp
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php \Drupal\Tests\system\Functional\Entity\EntityTranslationFormTest::setUp()
- 8.9.x core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php \Drupal\Tests\system\Functional\Entity\EntityTranslationFormTest::setUp()
- 10 core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php \Drupal\Tests\system\Functional\Entity\EntityTranslationFormTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityTranslationFormTest.php, line 38
Class
- EntityTranslationFormTest
- Tests entity translation form.
Namespace
Drupal\Tests\system\Functional\EntityCode
protected function setUp() : void {
parent::setUp();
// Enable translations for the test entity type.
\Drupal::state()->set('entity_test.translation', TRUE);
// Create test languages.
$this->langcodes = [];
for ($i = 0; $i < 2; ++$i) {
$language = ConfigurableLanguage::create([
'id' => 'l' . $i,
'label' => $this->randomString(),
]);
$this->langcodes[$i] = $language->id();
$language->save();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.