You are here

public function GroupContentPermissionProviderTest::entityCreatePermissionProvider in Group 8

Data provider for testGetEntityCreatePermission().

Return value

array A list of testGetEntityCreatePermission method arguments.

File

tests/src/Unit/GroupContentPermissionProviderTest.php, line 453

Class

GroupContentPermissionProviderTest
Tests the default GroupContentEnabler permission_provider handler.

Namespace

Drupal\Tests\group\Unit

Code

public function entityCreatePermissionProvider() {
  $cases = [];
  foreach ($this
    ->getPermissionProviderScenarios() as $scenario) {
    $case = $scenario;
    $case['expected'] = FALSE;
    if ($case['definition']['entity_access']) {
      $case['expected'] = "create {$scenario['plugin_id']} entity";
    }
    $cases[] = $case;
  }
  return $cases;
}