public function GroupContentCreateAccessTest::formAccessProvider in Group 8
Same name and namespace in other branches
- 2.0.x tests/src/Kernel/GroupContentCreateAccessTest.php \Drupal\Tests\group\Kernel\GroupContentCreateAccessTest::formAccessProvider()
Data provider for testFormAccess().
Return value
array A list of testFormAccess method arguments.
File
- tests/
src/ Kernel/ GroupContentCreateAccessTest.php, line 218
Class
- GroupContentCreateAccessTest
- Tests the group content create access for groups.
Namespace
Drupal\Tests\group\KernelCode
public function formAccessProvider() {
$cases = [];
$cases['create-form-access'] = [
'entity.group_content.create_form',
[],
[
'create entity_test_as_content entity',
],
FALSE,
TRUE,
TRUE,
'Testing the _group_content_create_entity_access route access check with create access',
];
$cases['create-form-access-wrong-plugin'] = [
'entity.group_content.create_form',
[],
[
'create node_as_content:page entity',
],
FALSE,
FALSE,
TRUE,
'Testing the _group_content_create_entity_access route access check with create access from the wrong plugin',
];
$cases['create-form-with-add-access'] = [
'entity.group_content.create_form',
[],
[
'create entity_test_as_content content',
],
FALSE,
FALSE,
TRUE,
'Testing the _group_content_create_entity_access route access check with add access',
];
$cases['add-form-access'] = [
'entity.group_content.add_form',
[],
[
'create entity_test_as_content content',
],
FALSE,
TRUE,
TRUE,
'Testing the _group_content_create_access route access check with add access',
];
$cases['add-form-access-wrong-plugin'] = [
'entity.group_content.add_form',
[],
[
'create node_as_content:page content',
],
FALSE,
FALSE,
TRUE,
'Testing the _group_content_create_access route access check with add access from the wrong plugin',
];
$cases['add-form-with-create-access'] = [
'entity.group_content.add_form',
[],
[
'create entity_test_as_content entity',
],
FALSE,
FALSE,
TRUE,
'Testing the _group_content_create_access route access check with create access',
];
return $cases;
}