function ModerationActionsTest::setUp
Overrides BrowserTestBase::setUp
File
- 
              core/modules/ content_moderation/ tests/ src/ Functional/ ModerationActionsTest.php, line 39 
Class
- ModerationActionsTest
- Test the content moderation actions.
Namespace
Drupal\Tests\content_moderation\FunctionalCode
protected function setUp() : void {
  parent::setUp();
  $moderated_bundle = $this->createContentType([
    'type' => 'moderated_bundle',
  ]);
  $moderated_bundle->save();
  $standard_bundle = $this->createContentType([
    'type' => 'standard_bundle',
  ]);
  $standard_bundle->save();
  $workflow = $this->createEditorialWorkflow();
  $workflow->getTypePlugin()
    ->addEntityTypeAndBundle('node', 'moderated_bundle');
  $workflow->save();
  $admin = $this->drupalCreateUser([
    'access content overview',
    'administer nodes',
    'bypass node access',
  ]);
  $this->drupalLogin($admin);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
