You are here

public function GroupPermissionTest::testSet in Organic groups 8

Tests setting a property of a permission.

@covers ::set

@dataProvider groupPermissionProvider

Parameters

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

File

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

Class

GroupPermissionTest
Group permissions tests.

Namespace

Drupal\Tests\og\Unit

Code

public function testSet(array $values) {
  $permission = new GroupPermission();
  foreach ($values as $property => $value) {
    $permission
      ->set($property, $value);
    $this
      ->assertEquals($value, $permission
      ->get($property));
  }
}