function NodeTranslationUITest::setUp

Same name and namespace in other branches
  1. 11.x core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::setUp()
  2. 10 core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::setUp()
  3. 8.9.x core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::setUp()

File

core/modules/node/tests/src/Functional/NodeTranslationUITest.php, line 67

Class

NodeTranslationUITest
Tests the Node Translation UI.

Namespace

Drupal\Tests\node\Functional

Code

protected function setUp() : void {
  $this->entityTypeId = 'node';
  $this->bundle = 'article';
  parent::setUp();
  // Ensure the help message is shown even with prefixed paths.
  $this->drupalPlaceBlock('help_block', [
    'region' => 'content',
  ]);
  // Display the language selector.
  $this->drupalLogin($this->administrator);
  $edit = [
    'language_configuration[language_alterable]' => TRUE,
  ];
  $this->drupalGet('admin/structure/types/manage/article');
  $this->submitForm($edit, 'Save content type');
  $this->drupalLogin($this->translator);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.