public function StateTransitionValidationTest::userTransitionsProvider in Drupal 9
Same name and namespace in other branches
- 8 core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php \Drupal\Tests\content_moderation\Unit\StateTransitionValidationTest::userTransitionsProvider()
- 10 core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php \Drupal\Tests\content_moderation\Unit\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 @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;
}