You are here

public function OgAccessTest::testUserAccessNotGroup in Organic groups 8

Tests access for a non-group related entity.

@coversDefaultmethod ::userAccess @dataProvider permissionsProvider

File

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

Class

OgAccessTest
Tests access.

Namespace

Drupal\Tests\og\Unit

Code

public function testUserAccessNotGroup($operation) {
  $this->groupTypeManager
    ->isGroup($this->entityTypeId, $this->bundle)
    ->willReturn(FALSE);
  $user_access = $this->ogAccess
    ->userAccess($this->group, $operation);
  $this
    ->assertTrue($user_access
    ->isNeutral());
}