function ContentEntitySourceTranslatableEntityTest::setUp in Translation Management Tool 8
Overrides DrupalWebTestCase::setUp()
Overrides TMGMTTestBase::setUp
File
- sources/
content/ tests/ src/ Functional/ ContentEntitySourceTranslatableEntityTest.php, line 36
Class
- ContentEntitySourceTranslatableEntityTest
- Tests always embedded entity reference fields.
Namespace
Drupal\Tests\tmgmt_content\FunctionalCode
function setUp() : void {
parent::setUp();
$this
->addLanguage('de');
$this
->loginAsAdmin([
'administer tmgmt',
]);
// Create article content type.
$this
->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
// Enable entity translations for entity_test_composite and node.
$content_translation_manager = \Drupal::service('content_translation.manager');
$content_translation_manager
->setEnabled('entity_test_composite', 'entity_test_composite', TRUE);
$content_translation_manager
->setEnabled('node', 'article', TRUE);
}