protected function GroupContentPermissionProviderTest::getPermissionProviderScenarios in Group 8
All possible scenarios for a permission provider.
Return value
array A set of test cases to be used in data providers.
12 calls to GroupContentPermissionProviderTest::getPermissionProviderScenarios()
- GroupContentPermissionProviderTest::adminPermissionProvider in tests/
src/ Unit/ GroupContentPermissionProviderTest.php - Data provider for testGetAdminPermission().
- GroupContentPermissionProviderTest::buildPermissionsProvider in tests/
src/ Unit/ GroupContentPermissionProviderTest.php - Data provider for testBuildPermissions().
- GroupContentPermissionProviderTest::entityCreatePermissionProvider in tests/
src/ Unit/ GroupContentPermissionProviderTest.php - Data provider for testGetEntityCreatePermission().
- GroupContentPermissionProviderTest::entityDeletePermissionProvider in tests/
src/ Unit/ GroupContentPermissionProviderTest.php - Data provider for testGetEntityDeletePermission().
- GroupContentPermissionProviderTest::entityUpdatePermissionProvider in tests/
src/ Unit/ GroupContentPermissionProviderTest.php - Data provider for testGetEntityUpdatePermission().
File
- tests/
src/ Unit/ GroupContentPermissionProviderTest.php, line 622
Class
- GroupContentPermissionProviderTest
- Tests the default GroupContentEnabler permission_provider handler.
Namespace
Drupal\Tests\group\UnitCode
protected function getPermissionProviderScenarios() {
$scenarios = [];
foreach ([
TRUE,
FALSE,
] as $implements_owner) {
foreach ([
TRUE,
FALSE,
] as $implements_published) {
foreach ([
TRUE,
FALSE,
] as $entity_access) {
foreach ([
'administer foo',
FALSE,
] as $admin_permission) {
$scenarios[] = [
'expected' => NULL,
// We use a derivative ID to prove these work.
'plugin_id' => 'foo:baz',
'definition' => [
'id' => 'foo',
'label' => 'Foo',
'entity_type_id' => 'bar',
'entity_access' => $entity_access,
'admin_permission' => $admin_permission,
],
'implements_owner' => $implements_owner,
'implements_published' => $implements_published,
];
}
}
}
}
return $scenarios;
}