You are here

public function Update230Test::testEnableModerationSidebar in Lightning Workflow 8.3

@covers ::enableModerationSidebar

File

tests/src/Kernel/Update230Test.php, line 53

Class

Update230Test
@group lightning_workflow

Namespace

Drupal\Tests\lightning_workflow\Kernel

Code

public function testEnableModerationSidebar() {
  $this->container
    ->get('module_installer')
    ->install([
    'lightning_roles',
  ]);
  $node_type = $this
    ->createContentType()
    ->id();
  $this->update
    ->enableModerationSidebar();

  /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
  $module_handler = $this->container
    ->get('module_handler');
  $this
    ->assertTrue($module_handler
    ->moduleExists('moderation_sidebar'));
  $this
    ->assertTrue($module_handler
    ->moduleExists('toolbar'));
  $role = Role::load($node_type . '_creator');
  $this
    ->assertInstanceOf(Role::class, $role);
}