function ContentTranslationOperationsTest::setUp
Same name in other branches
- 9 core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationOperationsTest::setUp()
- 8.9.x core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationOperationsTest::setUp()
- 11.x core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationOperationsTest::setUp()
Overrides NodeTestBase::setUp
File
-
core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationOperationsTest.php, line 53
Class
- ContentTranslationOperationsTest
- Tests the content translation operations available in the content listing.
Namespace
Drupal\Tests\content_translation\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Enable additional languages.
$langcodes = [
'es',
'ast',
];
foreach ($langcodes as $langcode) {
static::createLanguageFromLangcode($langcode);
}
// Enable translation for the current entity type and ensure the change is
// picked up.
\Drupal::service('content_translation.manager')->setEnabled('node', 'article', TRUE);
$this->baseUser1 = $this->drupalCreateUser([
'access content overview',
]);
$this->baseUser2 = $this->drupalCreateUser([
'access content overview',
'create content translations',
'update content translations',
'delete content translations',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.