public function GroupContentPermissionProviderTest::entityDeletePermissionProvider in Group 8
Data provider for testGetEntityDeletePermission().
Return value
array A list of testGetEntityDeletePermission method arguments.
File
- tests/
src/ Unit/ GroupContentPermissionProviderTest.php, line 407
Class
- GroupContentPermissionProviderTest
- Tests the default GroupContentEnabler permission_provider handler.
Namespace
Drupal\Tests\group\UnitCode
public function entityDeletePermissionProvider() {
$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'] = "delete {$scope} {$scenario['plugin_id']} entity";
}
}
$cases[] = $case;
}
}
return $cases;
}