protected function EntityTranslationFormTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 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 32
Class
- EntityTranslationFormTest
- Tests entity translation form.
Namespace
Drupal\Tests\system\Functional\EntityCode
protected function setUp() {
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();
}
}