You are here

public function GroupPermissionTest::testSetRoles in Organic groups 8

Tests setting roles.

@covers ::setApplicableRoles

@dataProvider groupPermissionProvider

Parameters

array $values: Associative array of test values, keyed by property name.

File

tests/src/Unit/GroupPermissionTest.php, line 44

Class

GroupPermissionTest
Group permissions tests.

Namespace

Drupal\Tests\og\Unit

Code

public function testSetRoles(array $values) {
  $permission = new GroupPermission();
  $permission
    ->setApplicableRoles($values['roles']);
  $this
    ->assertEquals($values['roles'], $permission
    ->get('roles'));
}