You are here

public function EntityOperationsTest::provideEntityOperationScenarios in Group 2.0.x

Same name in this branch
  1. 2.0.x tests/src/Functional/EntityOperationsTest.php \Drupal\Tests\group\Functional\EntityOperationsTest::provideEntityOperationScenarios()
  2. 2.0.x modules/gnode/tests/src/Functional/EntityOperationsTest.php \Drupal\Tests\gnode\Functional\EntityOperationsTest::provideEntityOperationScenarios()
Same name and namespace in other branches
  1. 8 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\Functional

Code

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;
}