From eed7ea3a50d80c673e96e369c6b8c16c077f3ebc Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Thu, 22 Feb 2024 08:39:24 +0000
Subject: [PATCH] Issue #2867881 by catch, Wim Leers, smustgrave, dww: Remove
 @todo and workaround in Cookie ResourceTestTrait

---
 .../rest/tests/src/Functional/CookieResourceTestTrait.php     | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php b/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php
index 2d25b946a543..b2d076dedb9e 100644
--- a/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php
+++ b/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php
@@ -109,10 +109,6 @@ protected function assertResponseWhenMissingAuthentication($method, ResponseInte
       if (in_array('user.permissions', $expected_cookie_403_cacheability->getCacheContexts(), TRUE)) {
         $expected_cookie_403_cacheability->addCacheTags(['config:user.role.anonymous']);
       }
-      // @todo Fix \Drupal\block\BlockAccessControlHandler::mergeCacheabilityFromConditions() in https://www.drupal.org/node/2867881
-      if (static::$entityTypeId === 'block') {
-        $expected_cookie_403_cacheability->setCacheTags(str_replace('user:2', 'user:0', $expected_cookie_403_cacheability->getCacheTags()));
-      }
       $this->assertResourceErrorResponse(403, FALSE, $response, $expected_cookie_403_cacheability->getCacheTags(), $expected_cookie_403_cacheability->getCacheContexts(), 'MISS', FALSE);
     }
     else {
-- 
GitLab