function ModerationLocaleTest::setUp
Sets the test up.
Overrides ModerationStateTestBase::setUp
File
- 
              core/
modules/ content_moderation/ tests/ src/ Functional/ ModerationLocaleTest.php, line 46  
Class
- ModerationLocaleTest
 - Test content_moderation functionality with localization and translation.
 
Namespace
Drupal\Tests\content_moderation\FunctionalCode
protected function setUp() : void {
  parent::setUp();
  $this->drupalLogin($this->rootUser);
  // Enable moderation on Article node type.
  $this->createContentTypeFromUi('Article', 'article', TRUE);
  // Add French and Italian languages.
  static::createLanguageFromLangcode('fr');
  static::createLanguageFromLangcode('it');
  // 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.