function ModerationContentTranslationTest::setUp
Same name in other branches
- 9 core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php \Drupal\Tests\content_moderation\Functional\ModerationContentTranslationTest::setUp()
- 8.9.x core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php \Drupal\Tests\content_moderation\Functional\ModerationContentTranslationTest::setUp()
- 11.x core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php \Drupal\Tests\content_moderation\Functional\ModerationContentTranslationTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ content_moderation/ tests/ src/ Functional/ ModerationContentTranslationTest.php, line 53
Class
- ModerationContentTranslationTest
- Test content_moderation functionality with content_translation.
Namespace
Drupal\Tests\content_moderation\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this->drupalLogin($this->rootUser);
// Create an Article content type.
$this->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
])
->save();
static::createLanguageFromLangcode('fr');
// Enable content translation on articles.
$this->enableContentTranslation('node', 'article');
// Adding languages requires a container rebuild in the test running
// environment so that multilingual services are used.
$this->rebuildContainer();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.