public function FormModeManagerUiTest::setUsersTestPermissions in Form mode manager 8.2
Add permissions for each users used to this test.
2 calls to FormModeManagerUiTest::setUsersTestPermissions()
- FormModeManagerUiTest::setUp in tests/
src/ Functional/ FormModeManagerUiTest.php - FormModeManagerUiTest::testFieldFormFormModeManager in tests/
src/ Functional/ FormModeManagerUiTest.php - Test each entities using form mode works.
File
- tests/
src/ Functional/ FormModeManagerUiTest.php, line 138
Class
- FormModeManagerUiTest
- Tests the Form mode manager user interfaces.
Namespace
Drupal\Tests\form_mode_manager\FunctionalCode
public function setUsersTestPermissions(array $permissions) {
foreach ($this->users as $user) {
$role = Role::load($user
->getRoles()[1]);
user_role_grant_permissions($role
->id(), $permissions);
}
}