You are here

protected function NodeTranslationUITest::setUp in Drupal 9

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

Overrides ContentTranslationTestBase::setUp

File

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

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);
}