You are here

protected function ModerationSidebarTest::setUp in Moderation Sidebar 8

Same name in this branch
  1. 8 tests/src/Functional/ModerationSidebarTest.php \Drupal\Tests\moderation_sidebar\Functional\ModerationSidebarTest::setUp()
  2. 8 tests/src/FunctionalJavascript/ModerationSidebarTest.php \Drupal\Tests\moderation_sidebar\FunctionalJavascript\ModerationSidebarTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ModerationSidebarTest.php, line 38

Class

ModerationSidebarTest
Tests basic behaviour of Moderation Sidebar using a test entity.

Namespace

Drupal\Tests\moderation_sidebar\Functional

Code

protected function setUp() {
  parent::setUp();
  $workflow = $this
    ->createEditorialWorkflow();
  $this
    ->addEntityTypeAndBundleToWorkflow($workflow, 'entity_test_mulrevpub', 'entity_test_mulrevpub');
  $this
    ->drupalLogin($this
    ->createUser([
    'view test entity',
    'access toolbar',
    'access toolbar',
    'use ' . $workflow
      ->id() . ' transition create_new_draft',
    'use ' . $workflow
      ->id() . ' transition archive',
    'use ' . $workflow
      ->id() . ' transition publish',
    'use moderation sidebar',
  ]));
}