public function GroupContentCreateAccessTest::pageAccessProvider in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/GroupContentCreateAccessTest.php \Drupal\Tests\group\Kernel\GroupContentCreateAccessTest::pageAccessProvider()
Data provider for testPageAccess().
Return value
array A list of testPageAccess method arguments.
File
- tests/
src/ Kernel/ GroupContentCreateAccessTest.php, line 118
Class
- GroupContentCreateAccessTest
- Tests the group content create access for groups.
Namespace
Drupal\Tests\group\KernelCode
public function pageAccessProvider() {
$cases = [];
$cases['create-page-access-one'] = [
'entity.group_content.create_page',
[],
[
'create entity_test_as_content entity',
],
FALSE,
TRUE,
TRUE,
'Testing the _group_content_create_any_entity_access route access check with create access from one plugin',
];
$cases['create-page-access-multi'] = [
'entity.group_content.create_page',
[],
[
'create entity_test_as_content entity',
'create node_as_content:page entity',
],
FALSE,
TRUE,
TRUE,
'Testing the _group_content_create_any_entity_access route access check with create access from multiple plugins',
];
$cases['create-page-with-add-access'] = [
'entity.group_content.create_page',
[],
[
'create entity_test_as_content relation',
],
FALSE,
FALSE,
TRUE,
'Testing the _group_content_create_any_entity_access route access check with add access from one plugin',
];
$cases['add-page-access-one'] = [
'entity.group_content.add_page',
[],
[
'create entity_test_as_content relation',
],
FALSE,
TRUE,
TRUE,
'Testing the _group_content_create_any_access route access check with add access from one plugin',
];
$cases['add-page-access-multi'] = [
'entity.group_content.add_page',
[],
[
'create entity_test_as_content relation',
'create node_as_content:page relation',
],
FALSE,
TRUE,
TRUE,
'Testing the _group_content_create_any_access route access check with add access from multiple plugins',
];
$cases['add-page-with-create-access'] = [
'entity.group_content.add_page',
[],
[
'create entity_test_as_content entity',
],
FALSE,
FALSE,
TRUE,
'Testing the _group_content_create_any_access route access check with create access from one plugin',
];
return $cases;
}