diff -u b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php --- b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -388,9 +388,11 @@ // 200 for well-formed HEAD request. $response = $this->request('HEAD', $url, $request_options); $this->assertResourceResponse(200, '', $response); - // @todo Remove the if-test, remove the 'else', keep the body of the 'if' once https://www.drupal.org/node/2874938 lands. - // Dynamic Page Cache does not work for admin routes. - // @see \Drupal\dynamic_page_cache\PageCache\ResponsePolicy\DenyAdminRoutes + // @todo Entity resources with URLs that begin with '/admin/' are marked as + // administrative (see https://www.drupal.org/node/2874938), which + // excludes them from Dynamic Page Cache (see + // https://www.drupal.org/node/2877528). When either of those issues is + // fixed, remove the if-test and the 'else' block. if (strpos($this->entity->getEntityType()->getLinkTemplate('canonical'), '/admin/') !== 0) { $this->assertTrue($response->hasHeader('X-Drupal-Dynamic-Cache')); $this->assertSame(['MISS'], $response->getHeader('X-Drupal-Dynamic-Cache')); @@ -410,9 +412,11 @@ // Same for Dynamic Page Cache hit. $response = $this->request('GET', $url, $request_options); $this->assertResourceResponse(200, FALSE, $response); - // @todo Remove the if-test, remove the 'else', keep the body of the 'if' once https://www.drupal.org/node/2874938 lands. - // Dynamic Page Cache does not work for admin routes. - // @see \Drupal\dynamic_page_cache\PageCache\ResponsePolicy\DenyAdminRoutes + // @todo Entity resources with URLs that begin with '/admin/' are marked as + // administrative (see https://www.drupal.org/node/2874938), which + // excludes them from Dynamic Page Cache (see + // https://www.drupal.org/node/2877528). When either of those issues is + // fixed, remove the if-test and the 'else' block. if (strpos($this->entity->getEntityType()->getLinkTemplate('canonical'), '/admin/') !== 0) { $this->assertTrue($response->hasHeader('X-Drupal-Dynamic-Cache')); if (!static::$auth) {