function NodeTranslationUITest::setUp

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

Overrides BrowserTestBase::setUp

File

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

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();
    // Create the bundle.
    $this->drupalCreateContentType([
        'type' => 'article',
        'title' => 'Article',
    ]);
    $this->doSetup();
    // Ensure the help message is shown even with prefixed paths.
    $this->drupalPlaceBlock('help_block', [
        'region' => 'content',
    ]);
    // Display the language selector.
    static::enableBundleTranslation('node', 'article');
    $this->drupalLogin($this->translator);
}

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