protected function RevisionUiAccessTest::setUp in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/RevisionUiAccessTest.php \Drupal\Tests\group\Kernel\RevisionUiAccessTest::setUp()
Overrides GroupKernelTestBase::setUp
File
- tests/
src/ Kernel/ RevisionUiAccessTest.php, line 51
Class
- RevisionUiAccessTest
- Tests the revision UI access for groups.
Namespace
Drupal\Tests\group\KernelCode
protected function setUp() {
parent::setUp();
$this->accessManager = $this->container
->get('access_manager');
$this->routeProvider = $this->container
->get('router.route_provider');
$this->groupType = $this
->createGroupType([
'id' => 'revision_test',
'creator_membership' => FALSE,
]);
$this->adminRole = $this->entityTypeManager
->getStorage('group_role')
->create([
'id' => 'revision_test-admin',
'label' => 'Revision admin',
'weight' => 0,
'group_type' => $this->groupType
->id(),
]);
$this->adminRole
->grantPermission('administer group')
->save();
}