You are here

protected function ContentTranslationSettingsTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationSettingsTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php, line 42

Class

ContentTranslationSettingsTest
Tests the content translation settings UI.

Namespace

Drupal\Tests\content_translation\Functional

Code

protected function setUp() : void {
  parent::setUp();

  // Set up two content types to test fields shared between different
  // bundles.
  $this
    ->drupalCreateContentType([
    'type' => 'article',
  ]);
  $this
    ->drupalCreateContentType([
    'type' => 'page',
  ]);
  $this
    ->addDefaultCommentField('node', 'article', 'comment_article', CommentItemInterface::OPEN, 'comment_article');
  $this
    ->addDefaultCommentField('node', 'page', 'comment_page');
  $admin_user = $this
    ->drupalCreateUser([
    'access administration pages',
    'administer languages',
    'administer content translation',
    'administer content types',
    'administer node fields',
    'administer comment fields',
    'administer comments',
    'administer comment types',
    'administer account settings',
  ]);
  $this
    ->drupalLogin($admin_user);
}