function StateTransitionValidationTest::userTransitionsProvider
Same name in other branches
- 9 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()
- 11.x 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 113
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.