From b6d7a294a8e5bdcc4f945c998eda6c40f65d3cb1 Mon Sep 17 00:00:00 2001
From: Adam G-H <32250-phenaproxima@users.noreply.drupalcode.org>
Date: Thu, 19 Oct 2023 18:33:33 +0000
Subject: [PATCH] Issue #3363497: Remove unnecessary workaround for a
 permission that was added in Drupal 9.4

---
 tests/src/Functional/UpdaterFormTestBase.php | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/tests/src/Functional/UpdaterFormTestBase.php b/tests/src/Functional/UpdaterFormTestBase.php
index 3f5f2fb75c..edf685e744 100644
--- a/tests/src/Functional/UpdaterFormTestBase.php
+++ b/tests/src/Functional/UpdaterFormTestBase.php
@@ -45,20 +45,15 @@ abstract class UpdaterFormTestBase extends AutomaticUpdatesFunctionalTestBase {
     parent::setUp();
 
     $this->setReleaseMetadata(__DIR__ . '/../../../package_manager/tests/fixtures/release-history/drupal.9.8.1-security.xml');
-    $permissions = [
+    $user = $this->createUser([
       'administer site configuration',
       'administer software updates',
       'access administration pages',
       'access site in maintenance mode',
       'administer modules',
       'access site reports',
-    ];
-    // 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_push($permissions, 'view update notifications');
-    }
-    $user = $this->createUser($permissions);
+      'view update notifications',
+    ]);
     $this->drupalLogin($user);
     $this->checkForUpdates();
   }
-- 
GitLab