You are here

protected function TransitionAccessTest::setUp in Scheduler content moderation integration 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/TransitionAccessTest.php, line 39

Class

TransitionAccessTest
Test covering the TransitionAccessConstraintValidator.

Namespace

Drupal\Tests\scheduler_content_moderation_integration\Functional

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalCreateContentType([
    'type' => 'page',
    'name' => 'Basic page',
  ])
    ->setThirdPartySetting('scheduler', 'publish_enable', TRUE)
    ->setThirdPartySetting('scheduler', 'unpublish_enable', TRUE)
    ->save();
  $workflow = $this
    ->createEditorialWorkflow();
  $workflow
    ->getTypePlugin()
    ->addEntityTypeAndBundle('node', 'page');
  $workflow
    ->save();
  $this->schedulerUser = $this
    ->drupalCreateUser([
    'access content',
    'create page content',
    'edit any page content',
    'schedule publishing of nodes',
    'view latest version',
    'view any unpublished content',
    'access content overview',
    'use editorial transition create_new_draft',
    'use editorial transition publish',
    'use editorial transition archive',
  ]);
  $this->restrictedUser = $this
    ->drupalCreateUser([
    'access content',
    'create page content',
    'edit own page content',
    'view latest version',
    'view any unpublished content',
    'access content overview',
    'use editorial transition create_new_draft',
  ]);
}