Mercurial > hg > isophonics-drupal-site
diff core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php Tue Jul 10 15:07:59 2018 +0100 +++ b/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php Thu Feb 28 13:21:36 2019 +0000 @@ -99,7 +99,9 @@ // @see \Drupal\user\Authentication\Provider\Cookie // @todo https://www.drupal.org/node/2847623 if ($method === 'GET') { - $expected_cookie_403_cacheability = $this->getExpectedUnauthorizedAccessCacheability(); + $expected_cookie_403_cacheability = $this->getExpectedUnauthorizedAccessCacheability() + // @see \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber::onRespond() + ->addCacheableDependency($this->getExpectedUnauthorizedEntityAccessCacheability(FALSE)); // - \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber applies // to cacheable anonymous responses: it updates their cacheability. // - A 403 response to a GET request is cacheable. @@ -111,7 +113,7 @@ 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', 'MISS'); + $this->assertResourceErrorResponse(403, FALSE, $response, $expected_cookie_403_cacheability->getCacheTags(), $expected_cookie_403_cacheability->getCacheContexts(), 'MISS', FALSE); } else { $this->assertResourceErrorResponse(403, FALSE, $response);