function MenuUiContentModerationTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php, line 39

Class

MenuUiContentModerationTest
Tests Menu UI and Content Moderation integration.

Namespace

Drupal\Tests\menu_ui\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalPlaceBlock('system_menu_block:main');
    // Create a 'page' content type.
    $this->drupalCreateContentType([
        'type' => 'page',
        'name' => 'Basic page',
        'display_submitted' => FALSE,
    ]);
    $workflow = $this->createEditorialWorkflow();
    $workflow->getTypePlugin()
        ->addEntityTypeAndBundle('node', 'page');
    $workflow->save();
}

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