function StateTransitionValidationTest::userTransitionsProvider
Data provider for the user transition test.
File
- 
              core/
modules/ content_moderation/ tests/ src/ Unit/ StateTransitionValidationTest.php, line 99  
Class
- StateTransitionValidationTest
 - @coversDefaultClass \Drupal\content_moderation\StateTransitionValidation[[api-linebreak]] @group content_moderation
 
Namespace
Drupal\Tests\content_moderation\UnitCode
public function userTransitionsProvider() {
  // The user has the right permission, so let it through.
  $ret[] = [
    'draft',
    'draft',
    'use process transition draft',
    TRUE,
    TRUE,
  ];
  // The user doesn't have the right permission, block it.
  $ret[] = [
    'draft',
    'draft',
    'use process transition draft',
    FALSE,
    FALSE,
  ];
  // The user has some other permission that doesn't matter.
  $ret[] = [
    'draft',
    'draft',
    'use process transition review',
    TRUE,
    FALSE,
  ];
  return $ret;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.