You are here

protected function WebformGroupBrowserTestBase::setUp in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_group/tests/src/Functional/WebformGroupBrowserTestBase.php \Drupal\Tests\webform_group\Functional\WebformGroupBrowserTestBase::setUp()

Overrides GroupBrowserTestBase::setUp

File

modules/webform_group/tests/src/Functional/WebformGroupBrowserTestBase.php, line 30

Class

WebformGroupBrowserTestBase
Base class for webform group tests.

Namespace

Drupal\Tests\webform_group\Functional

Code

protected function setUp() {
  parent::setUp();

  // Allow all roles to view webform nodes.

  /** @var \Drupal\group\Entity\GroupRoleInterface[] $group_roles */
  $group_roles = GroupRole::loadMultiple();
  foreach ($group_roles as $group_role) {
    $group_role
      ->grantPermission('view group_node:webform entity');
    $group_role
      ->save();
  }
}