You are here

public function GroupContentPermissionProviderTest::testGetRelationUpdatePermission in Group 8

Tests the relation update permission name.

@covers ::getRelationUpdatePermission @dataProvider relationUpdatePermissionProvider

Parameters

mixed $expected: The expected return value.

string $plugin_id: The plugin ID.

array $definition: The plugin definition.

bool $implements_owner: Whether the plugin's entity type deals with ownership.

bool $implements_published: Whether the plugin's entity type deals with publishing of entities.

string $scope: The $scope parameter for the tested method.

File

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

Class

GroupContentPermissionProviderTest
Tests the default GroupContentEnabler permission_provider handler.

Namespace

Drupal\Tests\group\Unit

Code

public function testGetRelationUpdatePermission($expected, $plugin_id, array $definition, $implements_owner, $implements_published, $scope) {
  $permission_provider = $this
    ->createPermissionProvider($plugin_id, $definition, $implements_owner, $implements_published);
  $this
    ->assertEquals($expected, $permission_provider
    ->getRelationUpdatePermission($scope));
}