diff --git a/core/lib/Drupal/Core/Access/AccessResult.php b/core/lib/Drupal/Core/Access/AccessResult.php index b3a59d4..f24124e 100644 --- a/core/lib/Drupal/Core/Access/AccessResult.php +++ b/core/lib/Drupal/Core/Access/AccessResult.php @@ -354,8 +354,8 @@ public function cacheUntilConfigurationChanges(ConfigBase $configuration) { */ public function addCacheableDependency($other_object) { if ($other_object instanceof CacheableDependencyInterface) { - // This is called many times per request, so avoid merging unless absolutely - // necessary. + // This is called many times per request, so avoid merging unless + // absolutely necessary. if (empty($this->contexts)) { $this->contexts = $other_object->getCacheContexts(); } diff --git a/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php b/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php index cbc9c97..b5f928c 100644 --- a/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php +++ b/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php @@ -382,10 +382,9 @@ public function testCacheContexts() { /** * @covers ::addCacheTags - * @covers ::resetCacheTags + * @covers ::addCacheableDependency * @covers ::getCacheTags - * @covers ::cacheUntilEntityChanges - * @covers ::cacheUntilConfigurationChanges + * @covers ::resetCacheTags */ public function testCacheTags() { $verify = function (AccessResult $access, array $tags, array $contexts = [], $max_age = Cache::PERMANENT) {