You are here

public function OgAccessTest::testUserAccessOwner in Organic groups 8

Tests access by the owner of the entity.

@coversDefaultmethod ::userAccess @dataProvider permissionsProvider

File

tests/src/Unit/OgAccessTest.php, line 73

Class

OgAccessTest
Tests access.

Namespace

Drupal\Tests\og\Unit

Code

public function testUserAccessOwner($operation) {
  $this->config
    ->get('group_manager_full_access')
    ->willReturn(TRUE);
  $user_access = $this->ogAccess
    ->userAccess($this
    ->groupEntity(TRUE)
    ->reveal(), $operation, $this->user
    ->reveal());
  $this
    ->assertTrue($user_access
    ->isAllowed());
}