Skip to content
Snippets Groups Projects
Commit d9b09373 authored by Theresa Grannum's avatar Theresa Grannum Committed by Adam G-H
Browse files

Issue #3296065 by Theresa.Grannum: Fix brittle permission handling in UpdaterFormTest::setUp()

parent 5ae721cb
Branches 8.x-2.x
Tags 8.x-2.1
No related merge requests found
......@@ -53,15 +53,12 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
'access site in maintenance mode',
'administer modules',
'access site reports',
'view update notifications',
];
// BEGIN: DELETE FROM CORE MERGE REQUEST
// Check for permission that was added in Drupal core 9.4.x.
$available_permissions = array_keys($this->container->get('user.permissions')->getPermissions());
if (!in_array('view update notifications', $available_permissions, TRUE)) {
array_pop($permissions);
if (in_array('view update notifications', $available_permissions, TRUE)) {
array_push($permissions, 'view update notifications');
}
// END: DELETE FROM CORE MERGE REQUEST
$user = $this->createUser($permissions);
$this->drupalLogin($user);
$this->checkForUpdates();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment