public function EntityOperationsTest::provideEntityOperationScenarios in Group 8
Same name in this branch
- 8 tests/src/Functional/EntityOperationsTest.php \Drupal\Tests\group\Functional\EntityOperationsTest::provideEntityOperationScenarios()
- 8 modules/gnode/tests/src/Functional/EntityOperationsTest.php \Drupal\Tests\gnode\Functional\EntityOperationsTest::provideEntityOperationScenarios()
Same name and namespace in other branches
- 2.0.x tests/src/Functional/EntityOperationsTest.php \Drupal\Tests\group\Functional\EntityOperationsTest::provideEntityOperationScenarios()
Data provider for testEntityOperations().
1 method overrides EntityOperationsTest::provideEntityOperationScenarios()
- EntityOperationsTest::provideEntityOperationScenarios in modules/
gnode/ tests/ src/ Functional/ EntityOperationsTest.php - Data provider for testEntityOperations().
File
- tests/
src/ Functional/ EntityOperationsTest.php, line 57
Class
- EntityOperationsTest
- Tests that entity operations (do not) show up on the group overview.
Namespace
Drupal\Tests\group\FunctionalCode
public function provideEntityOperationScenarios() {
$scenarios['withoutAccess'] = [
[],
[
'group/1/edit' => 'Edit',
'group/1/members' => 'Members',
'group/1/delete' => 'Delete',
'group/1/revisions' => 'Revisions',
],
];
$scenarios['withAccess'] = [
[
'group/1/edit' => 'Edit',
'group/1/delete' => 'Delete',
'group/1/revisions' => 'Revisions',
],
[
'group/1/members' => 'Members',
],
[
'edit group',
'delete group',
'administer members',
'view group revisions',
],
];
$scenarios['withAccessAndViews'] = [
[
'group/1/edit' => 'Edit',
'group/1/members' => 'Members',
'group/1/delete' => 'Delete',
'group/1/revisions' => 'Revisions',
],
[],
[
'edit group',
'delete group',
'administer members',
'view group revisions',
],
[
'views',
],
];
return $scenarios;
}