function ContentModerationPermissionsTest::testPermissions

Same name in other branches
  1. 9 core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationPermissionsTest::testPermissions()
  2. 10 core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationPermissionsTest::testPermissions()
  3. 11.x core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationPermissionsTest::testPermissions()

Test permissions generated by content moderation.

@dataProvider permissionsTestCases

File

core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php, line 40

Class

ContentModerationPermissionsTest
Test to ensure content moderation permissions are generated correctly.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

public function testPermissions($workflow, $permissions) {
    Workflow::create($workflow)->save();
    $this->assertEquals($permissions, (new Permissions())->transitionPermissions());
}

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