public function OgAccessTest::testUserAccessAdminPermission in Organic groups 8
Tests access by a group administrator.
@coversDefaultmethod ::userAccess @dataProvider permissionsProvider
File
- tests/
src/ Unit/ OgAccessTest.php, line 61
Class
- OgAccessTest
- Tests access.
Namespace
Drupal\Tests\og\UnitCode
public function testUserAccessAdminPermission($operation) {
$this->user
->hasPermission('administer organic groups')
->willReturn(TRUE);
$user_access = $this->ogAccess
->userAccess($this->group, $operation, $this->user
->reveal());
$this
->assertTrue($user_access
->isAllowed());
}