public function GroupContentPermissionProviderTest::entityUpdatePermissionProvider in Group 8
Data provider for testGetEntityUpdatePermission().
Return value
array A list of testGetEntityUpdatePermission method arguments.
File
- tests/
src/ Unit/ GroupContentPermissionProviderTest.php, line 359
Class
- GroupContentPermissionProviderTest
- Tests the default GroupContentEnabler permission_provider handler.
Namespace
Drupal\Tests\group\UnitCode
public function entityUpdatePermissionProvider() {
$cases = [];
foreach ($this
->getPermissionProviderScenarios() as $scenario) {
foreach ([
'any',
'own',
] as $scope) {
$case = $scenario;
$case['scope'] = $scope;
$case['expected'] = FALSE;
if ($case['definition']['entity_access']) {
if ($case['implements_owner'] || $scope === 'any') {
$case['expected'] = "update {$scope} {$scenario['plugin_id']} entity";
}
}
$cases[] = $case;
}
}
return $cases;
}